I have an application (.rpm) that I am installing which has two directories that contain the configuration information and logs (hence must persist). I have created a volume in the Dockerfile and then created a simple script that removes old symlinks, moves the directories to my volume and then recreates the symlinks to the new location.
If I don’t run the script via Dockerfile, but manually run the script inside the image everything works. If however, the script is included in the Dockerfile; the directories are not relocated to my volume.
My assumption is that moving the directories to the volume isn’t supported.
I would be interested if anyone has come across something like this and overcome it.