3
4

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.

LXDコンテナでDockerが起動しない(起動に失敗する)問題への対応方法

Last updated at Posted at 2018-11-27

2019/2/7:こちらに最新の対応方法を記述しました。
https://qiita.com/tabimoba/items/e14ad812a148afc10b13

はじめに

Dockerの仕様変更により、LXDコンテナ上にDocker 18.09にインストールしてDockerを起動しようとすると、Dockerサービスが立ち上がらないという問題が発生しています。

現象

LXDコンテナ上でdockerサービスを起動しようとすると、サービスの起動に失敗します。
journalctl -xe を実行すると、以下のログが出力されます。

Nov 27 07:05:23 *********** modprobe[2576]: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-1072-aws/modules.dep.bin'
Nov 27 07:05:23 *********** modprobe[2576]: modprobe: FATAL: Module overlay not found in directory /lib/modules/4.4.0-1072-aws

対応方法

/lib/systemd/system/containerd.service ファイルを次の通り変更してから、systemctl start docker を実行すると、現象が解消されます。(ExecStartPreをコメントアウトします。)

/lib/systemd/system/containerd.service
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target

[Service]
# ExecStartPre=/sbin/modprobe overlay
ExecStart=/usr/bin/containerd
KillMode=process
Delegate=yes
LimitNOFILE=1048576
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity

上記対応でとりあえず問題なく動いています。問題がある場合は追って記載します。

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?