I am writing a Dockerfile for setting up an image for testing a web application. I am basing it on the tutum/lamp image (https://github.com/tutumcloud/tutum-docker-lamp/blob/master/Dockerfile) because that seems to be a good base to start from.
As part of my dockerfile, I want to create a mysql database and set up some stuff in it. However, the tutum/lamp image declares VOLUME ["/etc/mysql", "/var/lib/mysql" ]
, so if I understand correctly, any changes that I make to the MySQL database in the Dockerfile will not be persisted.
- Do I understand that correctly?
If yes,
- Is there a way to "undeclare" those volumes so that those directories will be part of the union file system like everything else?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…