D
D
DenZel2020-01-13 23:16:49
LXC
DenZel, 2020-01-13 23:16:49

systemd not starting in docker container?

Good evening!
Please tell me the best way to implement autostart of services in a container after it is restarted. Tried installing systemd in container, trying to run
systemctl enable Zabbix-agent
Synchronizing state of zabbix-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable zabbix-agent
What am I doing wrong? Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
planc, 2020-01-13
@gen4_gdm

only 1 process should be running in a container
https://docs.docker.com/engine/reference/commandli...
https://docs.docker.com/config/containers/start-co...
https:// www.zabbix.com/documentation/current/manua...

G
Georg Gaal, 2020-02-02
@gecube

sucking systemd into a docker container is a bad idea. Theoretically, this is possible, but there are a lot of additional steps
https://www.hippolab.ru/zapuskaem-systemd-v-docker...
On the other hand, you can use a lightweight init system like tini in a container or use the supervisor daemon .
Regarding zabbix - so generally take a regular image from the developers of zabbix or from the docker hub and don't reinvent the wheel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question