I’m sure I’m doing something silly, but I can’t seem to create a symlink in my image,which will then be present in my running container based on that image.
Here’s the relevant bit of the Dockerfile.
RUN mkdir /code
ADD . /code/
RUN pip install -r requirements.txt
RUN ln -s /usr/local/lib/python2.7/dist-packages/django/contrib/admin/media /code/static/media/admin
The output from the build command says it’s doing it without errors, but when I then fire up the container with docker-compose, there is no symlink at that location.
Should I even be doing it in the Dockerfile, or in docker-compose.yml, and is that the correct syntax?
If I docker exec into the running container, running that exact code does create the symlink.
Thanks for any help or tips.