Problem with plone on docker

Hello,

When I try to run a Plone docker container, while externalizing /data for example by specifying in docker-compose:

volumes:
- /opt/docker/wordpress/plone-data:/data

I get the following error when docker tries to install plone:

Error: The directory named as part of the path /data/filestorage/Data.fs does not exist.
(line 51 in file:///plone/instance/parts/instance/etc/zope.conf)
For help, use bin/instance -h

If I don't try to externalize /data the container comes up fine.

Please help!

Thanks,

Oren

Try mkdir /data or change /data with an existing path on your machine

The best practice here is to use docker volumes:

docker run --name=plone -v plone-data:/data plone/plone

Then you can copy your Data.fs by using docker cp like:

docker cp Data.fs my-plone:/data/fliestorage/

Otherwise, try to mount specific data directories within container (/data/filestorage and/or data/blobstorage) like:

docker run -v /opt/docker/wordpress/plone-data/filestorage:/data/filestorage -v /opt/docker/wordpress/plone-data/blobstorage:/data/blobstorage plone/plone

Thank you, thank you, thank you, Alin!

I tried all sorts of things, even creating a new user on my Mac with id 500 to match plone in the Docker container, and nothing worked. I could bash into the container and launch Plone with "bin/instance fg" but "bin/instance start" would always fail.

Then I read your suggestion and made separate Docker compose file lines for filestorage, blobstorage, and log. VoilĂ ! Plone in Docker now works great with host-mounted volumes!!!

Thanks again.