Docker Community Forums

Share and learn in the Docker community.

Proper way to extend an entryfile

docker

(Jmart) #1

It’s been my experience that adding an entryfile to Dockerfile tends to completely overwrite any reference to the parent file. For example, I am extending the base mysql image with some simple database importation scripts to init data. I’d like to just layer over my scripts to the existing entrypoint file since I don’t want to start maintaining a diverging code base from the original image. But it seems any reference to a new file completely overwrites the old entryfile. What’s the best practice to “extend” an entryfile? I am also open to best practices if there are better ways to init data or if my workflow is just way off in total! Working my way through this stuff.