Systemctl usage in container

Hello All,

To run a service inside a Docker container, I understand that the systemctl command can be used to start the service. However, this requires running the container in privileged mode and mounting the necessary systemd volumes. While this approach allows interaction with system services inside the container, it is generally not recommended as it compromises the isolation of the container.

Is there an alternative way to run services within a container without relying on systemctl or privileged mode?

Usually you run one service as main process in one container.

Like a web server, that is not sent to background, but stays the main process.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.