标签:response doc 服务 dock test col vol ports tar
mkdir -p /opt/mock/mappings
docker run -d --name wiremock -v /opt/mock/mappings:/home/wiremock/mappings -p 9999:8080 rodolpheche/wiremock:latest
OR
mkdir mappings vim docker-compose.yml version: ‘2.4‘
services:
mock:
image: "rodolpheche/wiremock"
restart: always
#network_mode: "host"
ports:
- 9999:8080
volumes:
- ./mappings:/home/wiremock/mappings
目录结构
./ ├── docker-compose.yml └── mappings └── users.json
json 范例 访问 http://localhost:9999/users
{ "request": { "method": "GET", "url": "/users" }, "response": { "status": 200, "jsonBody": [ { "name":"dalong", "appversion":"v1" }, { "name":"login", "appversion":"v1" }, { "name":"user", "appversion":"v1" } ], "headers": { "Content-Type": "application/json" } } }
标签:response doc 服务 dock test col vol ports tar
原文地址:https://www.cnblogs.com/nhz-M/p/12199331.html