LoginSignup
2
1

More than 5 years have passed since last update.

Dockerコンテナ起動時の初期化されるファイル一覧

Last updated at Posted at 2016-05-17

docker start を行うとコンテナはDockerイメージから起動します。
ところがApache をインストールしたWEBコンテナにて、/etc/httpd/conf.d 配下のファイルを編集後、docker stop して、再度docker start してもコンテナ上の設定は残っています。

■ 仮説
結局、Dockerイメージを利用して起動する部分は局所的なんでしょ?!
と仮設を立てて、いろいろなファイルをいじってみました。(まだ検証途中ですが、分かってる範囲で追記していきます。切りがないと言えば切りがないですが、みなさんの何かの助けになれば・・・)


<イメージから起動されて、設定が残らないファイル>
/etc/hosts
/etc/hostname
/etc/resolv.conf
systemctl disable mysql → インストール方法によるものなのかな。。。。


<docker stop / docker start を実行しても設定が残るファイル>
(おそらく上記設定が残らないファイルに記載されているもの以外)
/etc/httpd 配下
/etc/hosts.allow
/etc/hosts.deny
/etc/ssh/sshd_config
systemctl enable / disable の情報

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