Skip to content

Commit

Permalink
upgrade to version 2.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolpheche committed Dec 3, 2017
1 parent 33bf8ac commit 151bcac
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:8-jre

MAINTAINER Rodolphe CHAIGNEAU <[email protected]>

ENV WIREMOCK_VERSION 2.11.0
ENV WIREMOCK_VERSION 2.12.0
ENV GOSU_VERSION 1.7

# grab gosu for easy step-down from root
Expand Down
2 changes: 1 addition & 1 deletion alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:8-jre-alpine

MAINTAINER Rodolphe CHAIGNEAU <[email protected]>

ENV WIREMOCK_VERSION 2.11.0
ENV WIREMOCK_VERSION 2.12.0

RUN apk add --update openssl

Expand Down
22 changes: 20 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
## Supported tags & respective Dockerfile links :


- `2.11.0`, `latest` [(2.11/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.11.0/Dockerfile)
- `2.12.0`, `latest` [(2.12/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.12.0/Dockerfile)
- `2.12.0-alpine` [(2.12-alpine/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.12.0/alpine/Dockerfile)
- `2.11.0` [(2.11/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.11.0/Dockerfile)
- `2.11.0-alpine` [(2.11-alpine/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.11.0/alpine/Dockerfile)
- `2.10.1` [(2.10/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.10.1/Dockerfile)
- `2.10.1-alpine` [(2.10-alpine/Dockerfile)](https://github.com/rodolpheche/wiremock-docker/blob/2.10.1/alpine/Dockerfile)
Expand Down Expand Up @@ -60,7 +62,7 @@ docker run -it --rm -p 8081:8081 rodolpheche/wiremock --https-port 8081 --verbos
##### Start record mode using host uid for file creation

In Record mode, when binding host folders (ex. $PWD/test) with the container volume (/home/wiremock), the created files will be owned by root, which is, in most cases, undesired.
In Record mode, when binding host folders (e.g. $PWD/test) with the container volume (/home/wiremock), the created files will be owned by root, which is, in most cases, undesired.
To avoid this, you can use the `uid` docker environment variable to also bind host uid with the container executor uid.

```sh
Expand All @@ -76,6 +78,22 @@ docker rm -f rodolpheche-wiremock-container
```

> Check the created file owner with `ls -alR test`
However, the example above is a facility.
The good practice is to create yourself the binded folder with correct permissions and to use the *-u* docker argument.

```sh
mkdir test
docker run -d --name rodolpheche-wiremock-container \
-p 8080:8080 \
-v $PWD/test:/home/wiremock \
-u $(id -u):$(id -u) \
rodolpheche/wiremock \
--proxy-all="http://registry.hub.docker.com" \
--record-mappings --verbose
curl http://localhost:8080
docker rm -f rodolpheche-wiremock-container
```

#### Samples

Expand Down

0 comments on commit 151bcac

Please sign in to comment.