I'm trying to deploy a custom image to an app service in azure.
Incidentally it's based on a wiremock image and simply copies some configuration files to be used at runtime.
Interestingly the directory gets created, just none of the contained files.
One of the dockerfiles I've tried
FROM wiremock/wiremock:3.12.1-1
WORKDIR /home/wiremock
COPY ./Configuration/mappings ./mappings
COPY ./Configuration/__files ./__files
RUN ["ls", "mappings"]
RUN ["ls", "__files"]
ENTRYPOINT ["/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose"]
I suspected it was something to do with using the /home
directory (default location for wiremock) or something to do with needing a mounted storage account but I had assumed if the files are baked in, I shouldn't need one.
I've tried copying to a custom directory and overwriting the default config location in wiremock (the below docker file also copies the config all over the place to see if I could see it anywhere, no joy)
e.g.
FROM wiremock/wiremock:3.12.1-1
COPY ./Configuration /home/home/notwiremock
COPY ./Configuration /home/home/wiremock
COPY ./Configuration /wiremock
WORKDIR /home/wiremock/configuration
COPY ./Configuration/mappings ./mappings
COPY ./Configuration/__files ./__files
RUN ["ls", "mappings"]
RUN ["ls", "__files"]
ENTRYPOINT ["/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose", "--root-dir=/home/wiremock/configuration"]
I tried using a custom directory, not in /home and it worked. I suspect, as appservice uses /home as a special directory where files persist between restarts, I had to use a different directory. (It also appears you can't get these file through the kudu shell
FROM wiremock/wiremock:3.12.1-1
WORKDIR /wiremock/configuration
COPY ./Configuration/mappings ./mappings
COPY ./Configuration/__files ./__files
RUN ["ls", "mappings"]
RUN ["ls", "__files"]
ENTRYPOINT ["/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose", "--root-dir=/wiremock/configuration"]