这是我的主要pice:D与ubuntu在docker容器中运行systemd:D我在docker内部使用systemd的Ubuntu
我的docker-systemd容器的GitHub Repo
$ docker run -it --cap-add SYS_ADMIN -v /sys/fs/cgroup:/sys/fs/cgroup:ro dockerimages/docker-systemd
输出:
systemd 218 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
Detected virtualization 'docker'.
Detected architecture 'x86-64'.
Welcome to Ubuntu Vivid Vervet (development branch)!
Set hostname to <502ec40509a5>.
[ OK ] Created slice Root Slice.
[ OK ] Created slice System Slice.
Starting Emergency Shell...
[ OK ] Started Emergency Shell.
Startup finished in 5ms.
Welcome to emergency mode! After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to
try again to boot into default mode.
root@502ec40509a5:~# exit
systemd
手册页将是一个良好的开端。Google还产生了几篇有关在docker下运行systemd的文章。