I have a docker image that I want to use and reuse when it's updated. I want to avoid making any changes to the image itself to semi-automate the process of pulling the latest image and deploying containers based on it without having to jump through extra hoops.
Part of the process involves being able to modify the docker-entrypoint.sh file located in the container at
/usr/local/bin/docker-entrypoint.sh
My logic was to mount it as a bind mount point to a local file that I can edit as required - that way I don't have to update an image and commit every time an update to the original image is released to make changes to the docker-entrypoint.sh file.
I'm running the container with this command:
docker run -d --name test10-new --mount type=bind,source=/data/docker-entrypoint.sh,target=/usr/local/bin/docker-entrypoint.sh new-test:latest
It runs fine without the mount, but with the mount it fails with only this in the log:
': No such file or directory
Any idea what could be going wrong? The local copy of docker-entrypoint.sh is executable. Thanks in advance!