dockerploneplone-5.x

Plone on Docker always starts from scratch


I'm trying to develope Plone project with Docker, i have used this official image of Plone 5.2.0, 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.

enter image description here

Anybody could help me with this. Thanks in advance.


Solution

  • This is expected behavior, because docker run starts a new container, which doesn't have the state from your previous container.

    You can use docker start CONTAINER, which will have the state from that CONTAINER's setup https://docs.docker.com/engine/reference/commandline/start/

    A more common approach is to use docker-compose.yml and docker-compose up -d, which will, in most cases, reuse previous state. https://docs.docker.com/compose/gettingstarted/