Skip to content

Commit 8832059

Browse files
committed
Add wiremock docker example
1 parent 2887f18 commit 8832059

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

wiremock-docker/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM openjdk:8-jre
2+
3+
ENV WIREMOCK_VERSION 2.26.0
4+
5+
RUN mkdir -p /var/wiremock/mappings
6+
RUN wget https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/$WIREMOCK_VERSION/wiremock-jre8-standalone-$WIREMOCK_VERSION.jar \
7+
-O /var/wiremock/wiremock-jre8-standalone.jar
8+
9+
WORKDIR /var/wiremock
10+
11+
EXPOSE 8080
12+
13+
CMD java -jar /var/wiremock/wiremock-jre8-standalone.jar

wiremock-docker/docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
version: '3'
3+
services:
4+
wiremock:
5+
build: .
6+
image: lgvalle/wiremock
7+
container_name: wiremock-standalone
8+
ports:
9+
- "8080:8080"
10+
volumes:
11+
- ./mappings:/var/wiremock/mappings
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"request": {
3+
"method": "GET",
4+
"url": "/hello"
5+
},
6+
"response": {
7+
"status": 200,
8+
"jsonBody": {
9+
"status": "Everything is fine",
10+
"message": "Hello Novoda!"
11+
},
12+
"headers": {
13+
"Content-Type": "application/json"
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)