Hello! I'm having what I think is a silly issue, b...
# help
j
Hello! I'm having what I think is a silly issue, but I can't figure it out. I'm seeing errors from my local app saying
java.io.FileNotFoundException: /home/wiremock/./__files/responses
which makes sense because it seems like that path is incorrect. The problem is I can't figure out how to correct it. I've defined wiremock in my docker compose (defined at
.docker/compose.yml
as follows:
Copy code
wiremock:
    image: wiremock/wiremock:3.12.1
    container_name: wiremock
    ports:
      - "3000:8080"
    volumes:
      - ../wire-mock:/home/wiremock
    entrypoint: ["/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose"]
my wiremock directory is a top level directory at
wire-mock
in the project Any help would be greatly appreciated. thanks y'all
l
Not really sure what the issue is here. Have you tried renaming your top level directory from
wire-mock
to
wiremock
? I tend to map the individual directories myself. Not sure if that makes much of a difference though. Here is my example project that I use when playing around with docker and wiremock https://github.com/leeturner/wiremock-standalone-docker-example You can compare my docker compose file here - https://github.com/leeturner/wiremock-standalone-docker-example/blob/main/docker-compose.yml
I assume you have a
responses
directory in your
__files
directory ? Is this being referenced from one of your stubs ?
j
Yep references from one of the stubs, and I have mapped the wire-mock directory previously and am not trying the __files and mappings one to see.
I’ll try renaming the top level wire-mock
j
Update: renaming the top level
wire-mock
didn't do anything 😞
l
Does everything work if you remove the stub that references the file ? Could you post the tub json here ?
j
I actually got it thanks to you sharing your compose.yml. The issue seemed to be in either
--global-response-templating
or
--disable-gzip
, because removing both of those from the entry point fixed the issue
Thank you!
l
OK, wasn't expecting that to be the issue but glad you got it sorted 🙂