yhashi1977
2021年4月2日 9時07分
下記のページを参考にしてArmadillo-IoT G3へのDockerのインストールができたので、
同様の手順でArmadillo-610にもDockerをインストールしてみましたが、
インストール完了後のDocker起動時にエラーとなります。
参考ページ
https://armadillo.atmark-techno.com/blog/10899/4102
インストール手順の最後のdocker-ce、docker-ce-cli、containerd.ioの
インストールコマンド実行後のコンソール出力は以下の通りです。
root@armadillo:~# sudo apt-get install docker-ce docker-ce-cli containerd.io Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: apparmor docker-ce-rootless-extras git git-man liberror-perl libltdl7 patch pigz Suggested packages: apparmor-profiles-extra apparmor-utils cgroupfs-mount | cgroup-lite gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn ed diffutils-doc Recommended packages: slirp4netns The following NEW packages will be installed: apparmor containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras git git-man liberror-perl libltdl7 patch pigz 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 87.6 MB of archives. After this operation, 365 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://ftp.jp.debian.org/debian buster/main armhf pigz armhf 2.4-1 [53.2 kB] Get:2 http://ftp.jp.debian.org/debian buster/main armhf apparmor armhf 2.13.2-10 [465 kB] Get:3 http://ftp.jp.debian.org/debian buster/main armhf liberror-perl all 0.17027-2 [30.9 kB] Get:4 http://ftp.jp.debian.org/debian buster/main armhf git-man all 1:2.20.1-2+deb10u3 [1620 kB] Get:5 http://ftp.jp.debian.org/debian buster/main armhf git armhf 1:2.20.1-2+deb10u3 [4542 kB] Get:6 https://download.docker.com/linux/debian buster/stable armhf containerd.io armhf 1.4.4-1 [20.4 MB] Get:7 http://ftp.jp.debian.org/debian buster/main armhf libltdl7 armhf 2.4.6-9 [387 kB] Get:8 http://ftp.jp.debian.org/debian buster/main armhf patch armhf 2.7.6-3+deb10u1 [123 kB] Get:9 https://download.docker.com/linux/debian buster/stable armhf docker-ce-cli armhf 5:20.10.5~3-0~debian-buster [36.2 MB] Get:10 https://download.docker.com/linux/debian buster/stable armhf docker-ce armhf 5:20.10.5~3-0~debian-buster [15.8 MB] Get:11 https://download.docker.com/linux/debian buster/stable armhf docker-ce-rootless-extras armhf 5:20.10.5~3-0~debian-buster [7871 kB] Fetched 87.6 MB in 56s (1568 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package pigz. (Reading database ... 21706 files and directories currently installed.) Preparing to unpack .../00-pigz_2.4-1_armhf.deb ... Unpacking pigz (2.4-1) ... Selecting previously unselected package apparmor. Preparing to unpack .../01-apparmor_2.13.2-10_armhf.deb ... Unpacking apparmor (2.13.2-10) ... Selecting previously unselected package containerd.io. Preparing to unpack .../02-containerd.io_1.4.4-1_armhf.deb ... Unpacking containerd.io (1.4.4-1) ... Selecting previously unselected package docker-ce-cli. Preparing to unpack .../03-docker-ce-cli_5%3a20.10.5~3-0~debian-buster_armhf.deb ... Unpacking docker-ce-cli (5:20.10.5~3-0~debian-buster) ... Selecting previously unselected package docker-ce. Preparing to unpack .../04-docker-ce_5%3a20.10.5~3-0~debian-buster_armhf.deb ... Unpacking docker-ce (5:20.10.5~3-0~debian-buster) ... Selecting previously unselected package docker-ce-rootless-extras. Preparing to unpack .../05-docker-ce-rootless-extras_5%3a20.10.5~3-0~debian-buster_armhf.deb ... Unpacking docker-ce-rootless-extras (5:20.10.5~3-0~debian-buster) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../06-liberror-perl_0.17027-2_all.deb ... Unpacking liberror-perl (0.17027-2) ... Selecting previously unselected package git-man. Preparing to unpack .../07-git-man_1%3a2.20.1-2+deb10u3_all.deb ... Unpacking git-man (1:2.20.1-2+deb10u3) ... Selecting previously unselected package git. Preparing to unpack .../08-git_1%3a2.20.1-2+deb10u3_armhf.deb ... Unpacking git (1:2.20.1-2+deb10u3) ... Selecting previously unselected package libltdl7:armhf. Preparing to unpack .../09-libltdl7_2.4.6-9_armhf.deb ... Unpacking libltdl7:armhf (2.4.6-9) ... Selecting previously unselected package patch. Preparing to unpack .../10-patch_2.7.6-3+deb10u1_armhf.deb ... Unpacking patch (2.7.6-3+deb10u1) ... Setting up liberror-perl (0.17027-2) ... Setting up apparmor (2.13.2-10) ... Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service. Setting up containerd.io (1.4.4-1) ... Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service. Setting up patch (2.7.6-3+deb10u1) ... Setting up libltdl7:armhf (2.4.6-9) ... Setting up docker-ce-cli (5:20.10.5~3-0~debian-buster) ... Setting up pigz (2.4-1) ... Setting up git-man (1:2.20.1-2+deb10u3) ... Setting up docker-ce (5:20.10.5~3-0~debian-buster) ... Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service. Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket. Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. invoke-rc.d: initscript docker, action "start" failed. ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Wed 2021-03-31 16:11:15 JST; 119ms ago Docs: https://docs.docker.com Process: 3493 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE) Main PID: 3493 (code=exited, status=1/FAILURE) Mar 31 16:11:15 armadillo systemd[1]: Failed to start Docker Application Container Engine. dpkg: error processing package docker-ce (--configure): installed docker-ce package post-installation script subprocess returned error exit status 1 Setting up git (1:2.20.1-2+deb10u3) ... dpkg: dependency problems prevent configuration of docker-ce-rootless-extras: docker-ce-rootless-extras depends on docker-ce; however: Package docker-ce is not configured yet. dpkg: error processing package docker-ce-rootless-extras (--configure): dependency problems - leaving unconfigured Processing triggers for systemd (241-7~deb10u7) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10) ... Errors were encountered while processing: docker-ce docker-ce-rootless-extras E: Sub-process /usr/bin/dpkg returned an error code (1) root@armadillo:~#
どなたか解決方法がわかる方おられましたら教えてください。
以上、よろしくお願いします。
コメント
yhashi1977
入江 様
ご返信ありがとうございます。アトム技研の橋本と申します。
コマンド実行してみました。
root@armadillo:~# dockerd INFO[2021-04-02T16:58:55.510604268+09:00] Starting up INFO[2021-04-02T16:58:55.525859563+09:00] parsed scheme: "unix" module=grpc INFO[2021-04-02T16:58:55.526230234+09:00] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2021-04-02T16:58:55.526698074+09:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc INFO[2021-04-02T16:58:55.526969995+09:00] ClientConn switching balancer to "pick_first" module=grpc INFO[2021-04-02T16:58:55.546760768+09:00] parsed scheme: "unix" module=grpc INFO[2021-04-02T16:58:55.547114523+09:00] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2021-04-02T16:58:55.547459361+09:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc INFO[2021-04-02T16:58:55.547728823+09:00] ClientConn switching balancer to "pick_first" module=grpc INFO[2021-04-02T16:58:56.168201449+09:00] [graphdriver] using prior storage driver: overlay2 WARN[2021-04-02T16:58:56.269442643+09:00] Your kernel does not support CPU realtime scheduler WARN[2021-04-02T16:58:56.269803773+09:00] Your kernel does not support cgroup blkio weight WARN[2021-04-02T16:58:56.270003026+09:00] Your kernel does not support cgroup blkio weight_device WARN[2021-04-02T16:58:56.270259446+09:00] Your kernel does not support cgroup blkio throttle.read_bps_device WARN[2021-04-02T16:58:56.270434198+09:00] Your kernel does not support cgroup blkio throttle.write_bps_device WARN[2021-04-02T16:58:56.270604201+09:00] Your kernel does not support cgroup blkio throttle.read_iops_device WARN[2021-04-02T16:58:56.270833371+09:00] Your kernel does not support cgroup blkio throttle.write_iops_device WARN[2021-04-02T16:58:56.270996331+09:00] Unable to find cpuset cgroup in mounts INFO[2021-04-02T16:58:56.273698910+09:00] Loading containers: start. WARN[2021-04-02T16:58:56.381255983+09:00] Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14-at31/modules.dep.bin' modprobe: WARNING: Module bridge not found in directory /lib/modules/4.14-at31 modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14-at31/modules.dep.bin' modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.14-at31 , error: exit status 1 WARN[2021-04-02T16:58:56.462436357+09:00] Running iptables --wait -t nat -L -n failed with message: `iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING`, error: exit status 4 INFO[2021-04-02T16:58:57.235517651+09:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=moby INFO[2021-04-02T16:58:57.239424455+09:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING (exit status 4) root@armadillo:~#
以上、よろしくお願いいたします。
at_akihito.irie
入江です。
当方で色々試してみました所、Armadillo-610標準カーネルでは、dockerを動
かすためのconfigが足りていないようです。
要求されるconfigの設定と、iptablesの設定を行うことでArmadillo-610上で
dockerが動作することを確認しました。
以下にその手順を紹介します。
まず、以下のマニュアルを参考に、Linuxカーネルをビルドできるようにして
ください。
https://manual.atmark-techno.com/armadillo-610/armadillo-610_product_ma…
次に、添付のa610_docker_defconfig.txt
をa610_docker_defconfig
にリネーム
した上で、arch/arm/configs/
に配置してください。
[ATDE]$ ls arch/arm/configs/a610_docker_defconfig arch/arm/configs/a610_docker_defconfig
下記コマンドを実行して、コンフィギュレーション適用の上、カーネルを再ビ
ルドしてください。
[ATDE]$ make ARCH=arm a610_docker_defconfig [ATDE]$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x82000000 uImage [ATDE]$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
ビルドしてできたuImageをArmadillo-610に書き込み、以下のコマンドを実行
した後に再起動してください。
[armadillo]# update-alternatives --set iptables /usr/sbin/iptables-legacy [armadillo]# update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
以上手順で作成した環境下でしたらdockerが動作するはずです。
当方ではdocker run hello-world
の動作のみ確認しておりますので、その他の
動作に関しましてはお客様の方で十分にテストされた上でご使用ください。
以下補足説明です。
docker動作のために必要なconfigがチェックできるスクリプトがあります。
https://raw.githubusercontent.com/dotcloud/docker/master/contrib/check-…
[armadillo]# wget https://raw.githubusercontent.com/dotcloud/docker/master/contrib/check-config.sh [armadillo]# chmod +x ./check-config.sh [armadillo]# ./check-config.sh
添付のdefconfigは上記スクリプト実行時の「Generally Necessary:」欄に出
力されたconfigのみ有効にしています。
ファイル | ファイルの説明 |
---|---|
a610_docker_defconfig.txt | 末尾の「.txt」は削除してお使いください。 |
yhashi1977
入江 様
お世話になっております。アトム技研の橋本です。
ご返信ありがとうございます。いただいた手順で無事、
610でもDockerが動作することを確認できました!
下記は、update-alternativesのコマンド2つ実行して
再起動したあとのコンソール出力で、単にできました!
とお伝えしたかっただけなので気にしないでください。
root@armadillo:~# docker -v [ 35.366200] random: crng init done [ 35.369654] random: 6 urandom warning(s) missed due to ratelimiting [ 39.226596] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready Docker version 20.10.5, build 55c4c88 root@armadillo:~# root@armadillo:~# root@armadillo:~# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 4ee5c797bcd7: Pull complete Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24 Status: Downloaded newer image for hello-world:latest [ 63.859574] docker0: port 1(vethed8e0b8) entered blocking state [ 63.865542] docker0: port 1(vethed8e0b8) entered disabled state [ 63.872020] device vethed8e0b8 entered promiscuous mode [ 63.919266] IPv6: ADDRCONF(NETDEV_UP): vethed8e0b8: link is not ready [ 68.050048] eth0: renamed from vetha5ef577 [ 68.069169] IPv6: ADDRCONF(NETDEV_CHANGE): vethed8e0b8: link becomes ready [ 68.076458] docker0: port 1(vethed8e0b8) entered blocking state [ 68.082412] docker0: port 1(vethed8e0b8) entered forwarding state [ 68.111034] IPv6: ADDRCONF(NETDEV_CHANGE): docker0: link becomes ready Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (arm32v7) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/ [ 68.906589] docker0: port 1(vethed8e0b8) entered disabled state [ 68.915322] vetha5ef577: renamed from eth0 [ 69.010465] docker0: port 1(vethed8e0b8) entered disabled state [ 69.017853] device vethed8e0b8 left promiscuous mode [ 69.022861] docker0: port 1(vethed8e0b8) entered disabled state root@armadillo:~#
以上、ご対応ありがとうございました。
at_akihito.irie
2021年4月2日 15時41分
入江です。
原因究明のため、以下のコマンドの出力をいただけますでしょうか。
以上、よろしくお願いいたします。