Wiremock Docker Container not using the supplied port (instead using 8080)

Viewed 2350

I am using WireMock Docker image and spinning off the container using it. I can verify the container is up and running but after looking at container logs, looks like it is still running on 8080? At least, I am not able to access Wiremock using localhost:9999/__admin

Create Wiremock container: docker run -d -p 9999:9999 my-registry.com/rodolpheche/wiremock --verbose

Verify container: docker ps

CONTAINER ID        IMAGE                              COMMAND                  CREATED             STATUS              PORTS                                        NAMES
7b9847734cd4        my-registry.com/rodolpheche/wiremock   "/docker-entrypoint.…"   7 seconds ago       Up 5 seconds        8080/tcp, 8443/tcp, 0.0.0.0:9999->9999/tcp   elegant_elion

enter image description here

2 Answers

You need to run docker run -it --rm -p 9999:8080 rodolpheche/wiremock in order to run the Wiremock as clearly mentioned in the documentation. It will be accessible using this url: http://localhost:9999/__admin

This fixed my issue (appending --port 9999):

docker run -d -p 9999:9999 my-registry.com/rodolpheche/wiremock --verbose --port 9999
Related