How to access the ZMI inside a Docker based Volto Deployment

After a hint by @yurj on Discord to use something like classic ui/manage I found this post related to a CookiePlone based setup:

Adding https://my-public-domain.com/ClassicUI and then after http auth opening https://my-public-domain.com/ClassicUI/manage_main opened access to the ZMI but only at the Plone site level not the ZMI root.

One of the targets of the mission was to change the default admin:admin credentials on the Zope Level of the backend from the ZMI.

addzopeuser command

In the past you could easily use the addzopeuser command on the commandline.

mtrebronNorbert shared:

Dec 2022

I use this when I need to create a new instance with a custom admin password:

/usr/local/Plone/venv/bin/addzopeuser admin secret

It expects the zope.conf file to be in /usr/local/Plone/venv/etc

Entering docker

You can enter a shell into the running docker container like this:

  1. login into the host machine plone user via ssh
  2. command to list containers: `docker ps``
  3. note down the container ID from the first column for ..._backend1
  4. enter a bash inside of the container: docker exec -it [container ID] bash
  5. prompt is now: root@[container ID]:/app
  6. you can now visit the /app/etc/zope.conf
  7. the addzopeuser command is at `/app/bin/addzopeuser

Looking ahead

Due to failing adjustment to the context of the zope.conf the addzopeuser command fails. No idea if I get it to work, but just wanted to share the approach entering the container for now.

This does not help to make up a way to open straightfoward a tunnel to the ZMI root for now.

1 Like