-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improves description of Docker bundle steps.
- Loading branch information
1 parent
52ce398
commit c4ccde4
Showing
6 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM outofcoffee/imposter as imposter | ||
FROM outofcoffee/imposter | ||
|
||
# docker healthcheck using embedded CLI | ||
HEALTHCHECK --interval=5s --timeout=5s --start-period=5s --retries=3 CMD imposter list -qx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM outofcoffee/imposter as imposter | ||
|
||
FROM eclipse-temurin:11.0.16_8-jre-focal | ||
COPY --from=imposter /opt/imposter/lib /opt/imposter/lib | ||
|
||
# your custom config | ||
COPY config /opt/imposter/config | ||
|
||
# optional docker healthcheck | ||
HEALTHCHECK --interval=5s --timeout=5s --start-period=5s --retries=3 CMD curl -f http://localhost:8080/system/status || exit 1 | ||
|
||
ENTRYPOINT ["java", "-classpath", "/opt/imposter/lib/*", "io.gatehill.imposter.cmd.ImposterLauncher", "--configDir", "/opt/imposter/config"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
plugin: rest | ||
|
||
resources: | ||
- path: "/users" | ||
method: "GET" | ||
response: | ||
statusCode: 200 | ||
headers: | ||
Content-Type: "application/json" | ||
content: | | ||
[ | ||
{ | ||
"id": 1, | ||
"name": "Ada" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Grace" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
services: | ||
mock-server: | ||
image: mock-server | ||
build: . | ||
ports: | ||
- "8080:8080" | ||
volumes: | ||
- ./config:/opt/imposter/config:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
FROM outofcoffee/imposter as imposter | ||
|
||
FROM eclipse-temurin:11.0.16_8-jre-focal | ||
COPY --from=imposter /opt/imposter/lib /opt/imposter/lib | ||
FROM outofcoffee/imposter | ||
|
||
# your custom config | ||
COPY config /opt/imposter/config | ||
|
||
# optional docker healthcheck | ||
HEALTHCHECK --interval=5s --timeout=5s --start-period=5s --retries=3 CMD curl -f http://localhost:8080/system/status || exit 1 | ||
|
||
ENTRYPOINT ["java", "-classpath", "/opt/imposter/lib/*", "io.gatehill.imposter.cmd.ImposterLauncher", "--configDir", "/opt/imposter/config"] |