Easy to use Mock Server
1.0K
Go Mock Server is a versatile tool crafted in Go to simplify the process of mocking HTTP requests, with a primary focus on being user-friendly, powerful, and flexible.
docker run --name mock-server --rm -p 8080:8080 -p 9090:9090 -v $(pwd)/sample-mocks:/mocks caik/go-mock-server:latest --mocks-directory /mocks
Where $(pwd)/sample-mocks is the path in your host machine where you have stored the mocks files. In case you want to start the application without any pre-existing mock files, you can also omit it:
docker run --name mock-server --rm -p 8080:8080 -p 9090:9090 caik/go-mock-server:latest --mocks-directory /mocks
Please also note that you change the port mapping from 8080 to any other port of your preference.
Although running this image via command-line should be pretty straighforward, you might also choose to run it via Docker Compose. For that, please use the following as a reference:
services:
mock-server:
image: caik/go-mock-server:latest
container_name: mock-server
networks:
- go-mock-server
ports:
- "8080:8080"
- "9090:9090"
volumes:
- /path/to/your/mocks/directory:/mocks
command:
- --mocks-directory
- /mocks
- --ui-dir
- /app/ui
networks:
go-mock-server: null
For more examples and complete documentation please go to our Github here.
Content type
Image
Digest
sha256:398f77f3d…
Size
15.3 MB
Last updated
4 months ago
docker pull caik/go-mock-server