Saturday, 15 June 2013

mysql - Persisting a dockerized WordPress (with LAMP stack) -


I'm taking my WordPress blog to dock with a traditional setup, but I have a problem understanding the data The best way to continue is to:

In short, I think that every blog is to be embedded inside its container (based on tutum / wordpress ) during my tests That if I save any data on the blog, when I do the container, the image Does not contain data as far as I thought Docker must save the position of the container to create a new image. This happens when I run the command or install the package on the container, but in no way happens when I create a new post in WordPress for example.

I have read something about the Docker versions, although I do not think a different data is very convenient in volume, because I want to like all the data in a container, after which I have more Can be easily transferred

Am I missing something? What is blocking the dock from saving new posts in WordPress?

Thanks for your time!

tutum: lamp

tutum / wordpress Code>, which declares a volume on / etc / mysql and / var / lib / mysql . Therefore, if you use that image, then you have the quantity that you like it or not because the data union in the volume is out of the file system, it's a docker commit command Will not be saved by

If you do not really want to use the volume, you can write your own dockerfile without volume details. However, this is not really working very well - every time you want to save the state of WordPress, you will have to create a new image, which will be built on the last one. Apart from just being annoying and unwieldy, you will eventually suppress the maximum number of layers allowed in an image.

Instead, you have to deal with the volume, I'm scared. It's not as bad as you think - you can just zoom the volume directory and open it in a new volume. The big advantage is that you can keep volatile and changing data separately from your application code which can be updated and changed separately.


No comments:

Post a Comment