LoginSignup
2
3

More than 5 years have passed since last update.

CentOS7ではSysVinitが廃止されてsystemdが採用されてた

Posted at

DockerfileでRUN service sshd startとしているところで、
serviceコマンドがNotFoundになっていたので気がついた。

現状DockerでCentos7を入れるとfakesystemdがインストールされていたり、
yum swap fakesystemd systemdが失敗したりするので、
Dockerfileの対応としてはCentOS6を使用するように修正した。

FROM centos:centos6

...

参考

Systemdコマンド早見表(CentOS 7対応)
http://blog.yuryu.jp/2014/07/systemd-quick-guide.html

CentOS 7のDockerコンテナ内でsystemdを使ってサービスを起動する
http://qiita.com/yunano/items/9637ee21a71eba197345

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