I'm trying to develope Plone project with Docker, i have used this official image of Plone 5.2.0 GitHub link:
plone/plone.docker/blob/master/5.2/5.2.0/debian/Dockerfile
The images is built a run perfectly with:
$ docker build -t plone-5.2.0-official-img .
$ docker run -p 8080:8080 -it plone-5.2.0-official-cntr
But the plone restarts each time i run the docker container asking to create the project from skratch.
@albertosanmartin Please be aware there is more you need to do than understanding the difference between starting/stopping or rebuilding containers. To my surprise the README you see on hub.docker.comhttps://hub.docker.com/_/plone has no documentation yet on persisting your data in Docker using volumes.
In short: when you start a container (running process) and create a virtual filesystem from an image (a kind of predefined mini-harddisk with all software already installed), any changes the running software makes to the virtual filesystem will be lost when the container is removed. You can stop and start the container, but as soon as you want to upgrade the container to a newer image, you'r stuck.
The idea is to overlay directories in the virtual filsystem and redirect them to another volume, independent from the container or image, for the official Plone image you need to grab the /data directory, 'data volumes' and 'host directories as a data volume'.