WireMock-Net / WireMock.Net-docker

WireMock.Net-docker is a Docker image which runs WireMock.Net (a flexible library for stubbing and mocking web services)
MIT License
22 stars 6 forks source link

CMD parameters vs ENTRYPOINT parameters #21

Closed kashifsoofi closed 5 years ago

kashifsoofi commented 5 years ago

Dockerfile is setting all the command line arguments to wiremock-net as ENTRYPOINT parameters. This makes it difficult to override the arguments specified.

We can move ReadStaticMappings and WireMockLogger as CMD arguments, that would make it easy to override with docker run and also would make it easier to create custom images based on this by copying over the static mappings. This will become

ENTRYPOINT ["./wiremock-net", "--Urls", "http://*:80", "--ReadStaticMappings", "false", "--WireMockLogger", "WireMockConsoleLogger"]

following

ENTRYPOINT ["./wiremock-net", "--Urls", "http://*:80"]
CMD ["--ReadStaticMappings", "false", "--WireMockLogger", "WireMockConsoleLogger"]

If happy with the suggestion, I can do a PR with changes. Thanks

StefH commented 5 years ago

Good suggestion, I didn't know this.

And I think it makes even more sense to just remove the ReadStaticMappings complete, because the default is null / false.

Please make a PR.