wiremock / wiremock-docker

Wiremock Docker image
https://hub.docker.com/r/wiremock/wiremock
MIT License
211 stars 99 forks source link

Customize PORT #47

Closed danilofuchs closed 2 years ago

danilofuchs commented 2 years ago

How do I customize the server PORT in docker-compose?

I tried setting PORT=8181 env but it had no affect.

danilofuchs commented 2 years ago

I discovered it is possible to customize flags during entrypoint

entrypoint: ["/docker-entrypoint.sh", "--port=8181"]

I just hoped it was more obvious in the docs

rodolpheche commented 2 years ago

It's effectively described in the doc : https://github.com/wiremock/wiremock-docker#start-a-wiremock-container-with-wiremock-arguments

However, I'm aware that it doesn't explain how to use it with docker-compose because I don't want to increase the doc with all orchestrators syntax (docker-compose, k8s, ...) in order to keep it clear

Finally, I recommand to not use the entrypoint for giving arguments. Prefer using the command that only needs to provide args:

command: ["--port=8181"]