[systemd-devel] detect_container() for recent(?) docker

Lennart Poettering lennart at poettering.net
Tue Jan 28 12:25:04 UTC 2020


On Di, 28.01.20 15:07, Matwey V. Kornilov (matwey.kornilov at gmail.com) wrote:

> Thanks for reply! I've just wanted to let you know about this issue
> after spending couple hours trying to understand why my container
> works on the one host and don't work on another one.
> I think there are couple things which can be done here. First, it
> would be great to modify the comment as proposed in PR 8200. If I knew
> that this test is fuzzy, I would not write this mail.
> Second, I didn't know about $container env until I read systemd
> sources. There are a lot of fragmental information about running
> systemd in docker in Internet, it would be great to have official
> systemd-point-of-view on this topic.

We document the requirements and expectations to run systemd in
containers very explicitly here:

https://systemd.io/CONTAINER_INTERFACE

The intention of that documentation is of course that container
managers can make systemd payloads just work. To my knowledge most
container managers implemented the bits necessary for that, but Docker
people are not interested in this. There's little we can do about
that.

I am sorry you picked the one container implementation who's not
interested in playing with the others, but there's nothing much we can
do about that.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list