-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1c546ac
Showing
3 changed files
with
55 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.project | ||
.settings | ||
.idea |
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,15 @@ | ||
FROM java:8-jdk | ||
|
||
ENV WIREMOCK_VERSION 2.0.6-beta | ||
|
||
RUN wget -q https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-standalone/${WIREMOCK_VERSION}/wiremock-standalone-$WIREMOCK_VERSION.jar | ||
|
||
RUN useradd wiremock -m | ||
USER wiremock | ||
WORKDIR /home/wiremock | ||
|
||
|
||
VOLUME /home/wiremock | ||
EXPOSE 8080 443 | ||
|
||
CMD java -jar /wiremock-standalone-$WIREMOCK_VERSION.jar $WIREMOCK_ARGS |
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,37 @@ | ||
# Wiremock Docker | ||
|
||
> [Wiremock](http://wiremock.org) standalone HTTP server Docker image | ||
## Supported tags and respective Dockerfile links : | ||
|
||
- `2.0.6-beta`, `latest` [(2.0/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.0.6-beta/Dockerfile) | ||
|
||
## How to use this image | ||
|
||
The image include | ||
|
||
- `EXPOSE 8080 443` : the wiremock http/https server port. | ||
|
||
- `VOLUME /home/wiremock` : the wiremock data storage. | ||
|
||
Launch a Wiremock container | ||
|
||
```sh | ||
$ docker run -d -v $PWD/stub:/home/wiremock -p 8080:8080 rodolpheche/wiremock | ||
``` | ||
|
||
> Simply access [http://localhost:8080/__admin](http://localhost:8080/__admin) to check your mappings | ||
Launch a Wiremock container with Wiremock arguments | ||
|
||
```sh | ||
$ docker run -d -v $PWD:/home/wiremock -p 8080:8080 -e WIREMOCK_ARGS="--verbose" rodolpheche/wiremock | ||
``` | ||
|
||
> `mappings` and `files__` folders created if not exist | ||
Stop the container with Wiremock HTTP API | ||
|
||
```sh | ||
$ curl -XPOST http://localhost:8080/__admin/shutdown | ||
``` |