-1

I am trying to build the docker image using CentOS 7.7 as my base docker image which is systemd image. Now, my requirement is like this: install the first RPM which starts the systemctl start my-process and this process required to be started in order to install my second RPM. But since Dockerfile not able to start the process using systemctl, i am not able to install any RPM correctly. I am getting following error:

Failed to get D-Bus connection: Operation not permitted

Niraj Nandane
  • 1,318
  • 1
  • 13
  • 24

1 Answers1

0

The "systemctl" client tool does not do much. It looks for the socket to contact the systemd daemon running on PID 1, i.e. the program you have been running from ENTRYPOINT. If you have removed the systemd service then you will get an error like that.

If you want to use a container like a virtual machine then it may be better run a different service-manager on PID-1. An example would be the docker-systemctl-replacement service.

It has served me well to bring applications into containers which were not really meant for that.

Guido U. Draheim
  • 3,038
  • 1
  • 20
  • 19