Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerized wiremock.net does not read static mappings #23

Closed
muhammadahmadsaeed opened this issue Oct 3, 2020 · 4 comments
Closed

Dockerized wiremock.net does not read static mappings #23

muhammadahmadsaeed opened this issue Oct 3, 2020 · 4 comments

Comments

@muhammadahmadsaeed
Copy link

muhammadahmadsaeed commented Oct 3, 2020

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
@StefH
Copy link
Contributor

StefH commented Oct 3, 2020

Hello @muhammadahmadsaeed,

Your question seems related to #10

But sending that flag should be possible I think by using

CMD ["--WireMockLogger", "WireMockConsoleLogger"]

But I'm not sure if this works.
Please keep me informed about your progress because I also want to know the answer.

@muhammadahmadsaeed
Copy link
Author

muhammadahmadsaeed commented Oct 4, 2020

@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.

@StefH
Copy link
Contributor

StefH commented Oct 4, 2020

Thank you very much for this example. I need to try this myself and then I will add this information to the Wiki.

@StefH
Copy link
Contributor

StefH commented Oct 5, 2020

@StefH StefH closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants