I'm trying to execute a Docker image built using 'ubuntu:latest' and I keep getting SystemD error messages when I run the container:
System has not been booted with systemd as init system (PID 1). Can't operate.
If I try this solution and spawn the container using docker run -it -e container=docker your-image-name /sbin/init, I get the following error:
Failed to mount tmpfs at /run: Operation not permitted
Failed to mount tmpfs at /run/lock: Operation not permitted
[!!!!!!] Failed to mount API filesystems, freezing.
Freezing execution.
What should I try differently?
docker exec
is for. – Crusdocker run -v
option. Running an ssh daemon in a container IME is pretty unusual (and presents some tricky management problems). – Stereobate/sbin/init
method from above. – Nick