Help us understand the problem. What is going on with this article?

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

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

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

参考

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away