在 debian systemd 包中找不到 systemd-machined

Chr*_*ski 2 debian packages containers systemd

我有一个 docker 容器,运行非常裸的 debian 版本。有了这个,我必须先在外部安装 systemd。为此,我有一个运行安装的 docker 容器,然后将其提交到一个映像,然后从该映像运行 systemd。当我 bash 进入容器时,在文件系统的任何地方都找不到 machinectl,并且 machined 似乎没有运行。我需要安装特定的软件包吗?或者由于我一开始就在容器中,是否无法进行机加工?我承认容器中的容器是不受欢迎的,但这个容器的目的是运行与 systemd-machined 接口的测试。

重现步骤:

docker run --privileged --cidfile=/tmp/cidfile debian:stretch bash -c 'apt-get update && apt-get install -y build-essential git dbus libsystemd-dev libpam-systemd'
docker commit `cat /tmp/cidfile` deb-machined-test
rm /tmp/cidfile
docker run -d --cidfile=/tmp/cidfile --privileged deb-machined-test /bin/systemd --system
Run Code Online (Sandbox Code Playgroud)

Chr*_*ski 6

原来 systemd-machined 与主 systemd 包位于一个单独的包中。为了在 Debian Stretch 上安装 systemd-machined,您必须运行apt-get install -y systemd-container.