gdraheim / docker-systemctl-replacement

docker systemctl replacement - allows to deploy to systemd-controlled containers without starting an actual systemd daemon (e.g. centos7, ubuntu16)
European Union Public License 1.2
1.4k stars 401 forks source link

Can't understand how logs and tty are working #178

Open ptempier opened 7 months ago

ptempier commented 7 months ago

Hello

I tried with a rockylinux container on a fedora host I have "few" logs on the container logs

so i hacked something to get all the service logs file content to proc 1 fd 1 using rsyslog I added logrotate and cronie, so i get an alternative for time and can copytruncate and compress service logs so now i have "few" logs duplicated as i get them from both docker-systemctl-replacement and from rsyslog

I realized that for all the services installed via rpm, the logs are not duplicated , but they are if i write the service myself and that if i write a neofetch service (to get some info on container start) and do cat /usr/lib/systemd/system/neofetch.service > /usr/lib/systemd/system/nginx.service

When i do : systemctl reload systemctl restart neofetch systemctl restart nginx

The logs are duplicated for neofetch but not for nginx So it s really for any service file which was installed by the system behaves differently than if i installed it myself. Even if the content is the same ....

Please suggest what might be going on.