caik/go-mock-server

By caik

Updated 4 months ago

Easy to use Mock Server

Image
Integration & delivery
Developer tools
Web servers
0

1.0K

caik/go-mock-server repository overview

Quick reference

What is Go Mock Server?

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.

How to use this image

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.

Running this image with Docker Compose

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

Documentation

For more examples and complete documentation please go to our Github here⁠.

Tag summary

Content type

Image

Digest

sha256:398f77f3d

Size

15.3 MB

Last updated

4 months ago

docker pull caik/go-mock-server