LoginSignup
2
2

More than 5 years have passed since last update.

boot2docker上のCentOS7はsystemdを入れられない

Posted at

どうせならCentOS7で!と意気込んだのにsystemctlでエラー。
結論から言うと、解決策は見つからなかった(途中で諦めた)です。

CentOS7のコンテナを作る

$ docker run -it centos:centos7 /bin/bash

systemdをインストール

どういう理由かまでわかりませんが最初はsystemdが入っていないので、そのままコンテナ端末上で、facesystemdと入れ替えて、systemctlを実行してみる。

# yum swap -y fakesystemd systemd
.
.
.
Error unpacking rpm package systemd-208-11.el7_0.6.x86_64
  Installing : systemd-208-11.el7_0.6.x86_64                               9/12 
error: unpacking of archive failed on file /usr/bin/systemd-detect-virt: cpio: cap_set_file
error: systemd-208-11.el7_0.6.x86_64: install failed
.
.
.

# systemctl 
Failed to get D-Bus connection: No connection to service manager.

使えない模様。

対策を探す

探すと下記ページが見つかりました。
boot2dockerなら特権モード(--privileged)ならあるいは!とあったので、早速実施します。
https://bugs.centos.org/view.php?id=7480

$ docker run --privileged -it centos:centos7 /bin/bash

結果、変わらず、エラー。
合わせて--cap-add=SYS_ADMIN対応も一応試してみたものの特に変わらず、エラー。

諦めた

# uname -a
Linux 21026139e6fc 3.16.7-tinycore64 #1 SMP Tue Dec 16 23:03:39 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

きっと3.x系になったから、というカーネルレベルのお話なんじゃないかと。ここから先具体的には調べてません。

boot2docker上でCentOS7は無理という結論にして、大人しく6系をpullしてます。

2
2
3

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
2
2