Docker Community Forums

Share and learn in the Docker community.

[Dockerfile] Persist one file created during the installation

(hugoliv) #1


Could you please tell me how to build a docker image with Dockerfile and persist a file that is added to the image during the build process ? The process is installed using apt-get install in the dockerfile and this installation create a config file in /etc/file.conf then I tried to mount a host directory as a data volume but the content is replaced so the file is removed. I also tried to move/copy the file without success.