我试图执行一个使用'ubuntu:latest'构建的Docker镜像,但是当我运行容器时,一直出现SystemD错误消息:
System has not been booted with systemd as init system (PID 1). Can't operate.
如果我尝试使用此解决方案并使用docker run -it -e container=docker your-image-name /sbin/init启动容器,则会出现以下错误:
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.
我应该尝试什么不同的方法?
docker exec
的用途。 - larsks