Docker containers

Dear docker fan boys and girls,
Please convince me to use docker containers instead of Plone installation from packages.
I've summarized the installation from packages in Install Plone from its packages – Install — Plone Documentation v6.0 and listed the common tasks including how to install Plone backend add-ons in Manage add-ons and packages – Install — Plone Documentation v6.0.

How do I docker compose a Plone installation with a docker compose configuration file (I like configuration files to have this Plone set up documented with add-ons, etc ) that raises a Plone backend with an add-on xy and add-on abc?

There are examples, but I don't get it.

Is a docker image so rigid, that I cannot provide a configuration attribute like an environment variable set in the docker compose configuration file to add an add-on? but instead need to build a custom image? I mean a Plone docker image is a Plone installation setup, isn't it? Why does it lack and how in future could it provide a slot to check in add-ons?

I am imagining a docker compose configuration file that allows to configure Plone backend add-ons.

No need to convince you. Docker in the context of Plone installations is wasted time for me.
Too error-prone, too time-consuming, too inflexible.

Hi @ksuess ,

I'm also new to docker but it ain't that bad. For my dev instance I have two volumes, one for the data dir (aka var) and the other for the src dir for addons I'm working on.

    image: plone/plone-backend:6.0
      SITE: PloneSite
      TYPE: classic
      ADDONS: collective.exportimport collective.easyform my.addon
      PLONE_DEVELOP: src/my.addon
      DELETE_EXISTING: false
      - /home/zope/instances/plone6/data:/data
      - /home/zope/instances/plone6/src:/data
    - "8080:8080"

Note that I set DELETE_EXISTING to false so I keep my database when restarting the container.

1 Like

IMHO the question is not "docker containers" vs. "installation from packages".

The basic question is whether you want (or need) to use the benefits of containerization (e.g. with docker) or not.

The plone docker images actually do a "Plone installation from the packages" (which of course could be used as a reference for installing plone from the packages without docker).

See for instance the code of Dockerfile.builder#L27

1 Like

Not sure if I qualify as a docker fan boy, but I have seen benefits. I have found that building custom images in CI/CD is a good approach that supports stable deployments. I'm deploying very simply (docker compose not kubernetes) and even then, building custom images has been helpful.

I would be interested in revisiting the pros and cons of packages vs containers in development. Haven't on-boarded a new dev recently but I suspect it will be easier to with containers than packages (just a guess). I should be doing on-boarding this month so we'll see.

If someone is starting out I don't know why anyone would not be starting with docker. Maybe if you think you will only ever have one service and one site and no adjustments for loaded needed?
Little bit a learning gets you a lot of flexibility and speed in adding additional parts to your stack.