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


i'm working on moving wordpress blogs traditional setup docker, i'm having trouble in understanding best way persist data.

in short, idea have each blog running inside own container (based on tutum/wordpress). during tests noticed if save data on blog, when commit container, image not contain such data. far understood docker supposed save status of container when committing new image. happens when run commands or install packages on container, somehow doesn't happen when i, example, create new post in wordpress.

i have read bit docker volumes, don't think having separate data volume convenient, i'd prefer having data in single container, can move around more easily.

is there missing? preventing docker saving new posts in wordpress?

thank time!

the dockerfile tutum/wordpress based off tutum:lamp, declares volumes @ /etc/mysql , /var/lib/mysql. so, if use image, have volumes whether or not. because data in volumes lives outside of union file system, not saved docker commit command.

if don't want use volumes, write own dockerfile without volume statements. however, isn't going work - every time want save state of wordpress have commit new image, build on top of last one. apart being annoying , unwieldy, hit maximum number of layers allowed in image.

instead, you're going have deal volumes i'm afraid. isn't bad think - can zip volume directory , unzip new volume. big advantage keep mutable , changing data separate application code can updated , changed separately.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -