I'm working on moving my WordPress blogs from a traditional setup to Docker, however I'm having some trouble in understanding what is the best way to persist data.
In short, my idea is to have each blog running inside its own container (based on tutum/wordpress
). During my tests I noticed that if I save any data on the blog, when I commit the container, the image does not contain such data. As far as I understood Docker is supposed to save the status of the container when committing a new image. This is what happens when I run commands or install packages on a container, but somehow doesn't happen when I, for example, create a new post in WordPress.
I have read a bit about Docker volumes, however I don't think having a separate data volume is very convenient, as I'd prefer having all data in a single container, which I can then move around more easily.
Is there anything I am missing? What is preventing Docker from saving new posts in WordPress?
Thank you all for your time!