I have a docker container running a very bare version of debian stretch. with this, I have to install systemd externally first. To do this, I have a docker container that runs the install, then I commit it to an image, I then run systemd from that image. When I bash into the container, machinectl is not found anywhere on the file system and machined does not seem to be running. Is there a specific package I need to install? Or due to the fact I am in a container to begin with, is machined not available? I recognize that containers in containers are frowned upon, but this container's purpose is for running tests interfacing with systemd-machined.

Steps to reproduce:

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

Turns out systemd-machined is in a separate package from the main systemd package. In order to install systemd-machined on Debian Stretch, you have to run apt-get install -y systemd-container.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.