起動
--privileged
オプションをつける
1 |
docker run -d --privileged centos /sbin/init |
bashにログイン
1 |
docker exec -it 0194fd8abde9 /bin/bash |
systemctlコマンド実行できた
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@0194fd8abde9 /]# systemctl status dbus.service ● dbus.service - D-Bus System Message Bus Loaded: loaded (/usr/lib/systemd/system/dbus.service; static; vendor preset: disabled) Active: active (running) since Mon 2019-10-07 07:08:58 UTC; 2min 25s ago Docs: man:dbus-daemon(1) Main PID: 50 (dbus-daemon) CGroup: /docker/ 0194fd8abde967b627918642e75db65a78fc4679d2723d150e96fcd20ebd5f04/ system.slice/dbus.service └─50 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation ‣ 50 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation Oct 07 07:08:58 0194fd8abde9 systemd[1]: Started D-Bus System Message Bus. [root@0194fd8abde9 /]# |
詳しくはよくわからない