Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolpheche committed Nov 26, 2015
0 parents commit 1c546ac
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.project
.settings
.idea
15 changes: 15 additions & 0 deletions Dockerfile
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
37 changes: 37 additions & 0 deletions readme.md
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
```

0 comments on commit 1c546ac

Please sign in to comment.