1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOSのDockerImageでsystemctlコマンドを使う

1
Posted at

起動

--privilegedオプションをつける

docker run -d --privileged centos /sbin/init

bashにログイン

docker exec -it 0194fd8abde9 /bin/bash

systemctlコマンド実行できた

[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 /]#

詳しくはよくわからない

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?