Dockerized wiremock.net does not read static mappings
muhammadahmadsaeed opened this issue · comments
I am trying to run wiremock .net in docker but it is not reading static files. How to send ReadStaticMappings flag in docker compose?
wiremock:
image: sheyenrath/wiremock.net
ports:
- "9091:80"
volumes:
- ./wiremock:/home/wiremock
Hello @muhammadahmadsaeed,
Your question seems related to #10
But sending that flag should be possible I think by using
But I'm not sure if this works.
Please keep me informed about your progress because I also want to know the answer.
@StefH Thank you for the response. I was able to create this docker compose file worked successfully.
version: "3.7"
services:
wiremock:
image: sheyenrath/wiremock.net
ports:
- "9091:80"
volumes:
- ./wiremock/mappings:/app/__admin/mappings
command: ["dotnet", "wiremock-net.dll", "--Urls", "http://*:80", "--ReadStaticMappings", "true", "--WireMockLogger", "WireMockConsoleLogger"]
Note: All the json files should be in ./wiremock/mappings host directory as per above volume mapping.
Thank you very much for this example. I need to try this myself and then I will add this information to the Wiki.
Wiki page has been added: https://github.com/WireMock-Net/WireMock.Net-docker/wiki/Docker-Compose