I have a Docker image that has all the dependencies and source code baked in. I want to run the unit tests in this container. Based on the documentation for run-config here I can see that for the
dir option is says:
Optional. A directory, relative to the initial working directory, to set as the working directory when running the script.
hijack the container, I can see the initial working directory is in the format
/tmp/build/b504838c or similar. In order to use the source code already baked into the image I have been using relative paths to get to the correct directory. For example
My question is, is this bad? Is there any reason I should not do this? Is there a better way to access the filesystem outside the initial working directory that I should use instead?
Any help appreciated, thanks!