質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Raspbian

Raspbianは、DebianベースのRaspberry Pi用ディストリビューション。ハードウェア浮動小数点演算を有効にすることが可能で、Webブラウズなどの速度を向上できます。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

解決済

1回答

2545閲覧

ラズパイにDockerを導入したい

tukasa_01

総合スコア13

Raspbian

Raspbianは、DebianベースのRaspberry Pi用ディストリビューション。ハードウェア浮動小数点演算を有効にすることが可能で、Webブラウズなどの速度を向上できます。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

0クリップ

投稿2018/11/24 11:00

ラズパイにDockerを導入したい

ラズパイにDockerを導入しようと、以下のコマンドを実行しました。
curl -sSL https://get.docker.com | sh
すると、以下のような文章が出てきました。

# Executing docker install script, commit: 46dc063 + sudo -E sh -c apt-get update -qq >/dev/null + sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null E: Sub-process /usr/bin/dpkg returned an error code (1)

sudoをつけたり、ラズパイのバージョンを最新にしてみたりしましたが、無理でした。
どうすれば、Dockerを導入できますか?

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

tukasa_01さん、

こちらの環境では、すんなり導入できました。
エラーが出る場所をみるため、以下のコマンドで、インストールを試して、ログをとってもらえますか?

$ curl -sSL https://get.docker.com | sed -e 's|-qq||g' -e 's|>/dev/null||g'| sh


以下の環境で、導入できました。

  • Raspberry Pi 3B / 3B+
  • Raspbian: 2018-11-13-raspbian-stretch.zip
  • microSD: 16GB

2018-11-13-raspbian-stretchをmicroSDにEtcherで書き込んだあと、起動して、初期設定(言語・Password変更・Wifiは設定、パッケージ更新はSkip)をして、ターミナルを開いて、以下のように実行しました。

pi@raspberrypi:~ $ curl -sSL https://get.docker.com | sh # Executing docker install script, commit: 46dc063 + sudo -E sh -c apt-get update -qq >/dev/null + sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null + sudo -E sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null Warning: apt-key output should not be parsed (stdout is not a terminal) + sudo -E sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch edge" > /etc/apt/sources.list.d/docker.list + [ raspbian = debian ] + sudo -E sh -c apt-get update -qq >/dev/null + sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null + sudo -E sh -c docker version Client: Version: 18.09.0 API version: 1.39 Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:57:21 2018 OS/Arch: linux/arm Experimental: false Server: Docker Engine - Community Engine: Version: 18.09.0 API version: 1.39 (minimum version 1.12) Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:17:57 2018 OS/Arch: linux/arm Experimental: false If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker pi Remember that you will have to log out and back in for this to take effect! WARNING: Adding a user to the "docker" group will grant the ability to run containers which can be used to obtain root privileges on the docker host. Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface for more information. pi@raspberrypi:~ $ pi@raspberrypi:~ $ sudo docker run -it --rm hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 61e750ce94d2: Pull complete Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788 Status: Downloaded newer image for hello-world:latest 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/ pi@raspberrypi:~ $ docker --version Docker version 18.09.0, build 4d60db4 pi@raspberrypi:~ $

投稿2018/11/25 02:35

mt08

総合スコア1825

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

tukasa_01

2018/11/25 08:35

ログをとるコマンドを入力したら、以下のように表示されました。 # Executing docker install script, commit: 46dc063 armv7l-raspbian-stretch + sudo -E sh -c apt-get update 取得:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB] 取得:2 http://archive.raspberrypi.org/debian stretch InRelease [25.3 kB] 取得:3 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB] 取得:4 http://archive.raspberrypi.org/debian stretch/main armhf Packages [199 kB] 取得:5 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [39.1 kB] 11.9 MB を 14秒 で取得しました (821 kB/s) パッケージリストを読み込んでいます... 完了 + sudo -E sh -c apt-get install -y apt-transport-https ca-certificates curl パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 apt-transport-https はすでに最新バージョン (1.4.8) です。 ca-certificates はすでに最新バージョン (20161130+nmu1+deb9u1) です。 curl はすでに最新バージョン (7.52.1-5+deb9u8) です。 アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 3 個。 + sudo -E sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add - OK + sudo -E sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch edge" > /etc/apt/sources.list.d/docker.list + [ raspbian = debian ] + sudo -E sh -c apt-get update ヒット:1 http://archive.raspberrypi.org/debian stretch InRelease 取得:2 https://download.docker.com/linux/raspbian stretch InRelease [31.1 kB] ヒット:3 http://raspbian.raspberrypi.org/raspbian stretch InRelease 取得:4 https://download.docker.com/linux/raspbian stretch/edge armhf Packages [5,216 B] 36.3 kB を 1秒 で取得しました (19.7 kB/s) パッケージリストを読み込んでいます... 完了 + sudo -E sh -c apt-get install -y --no-install-recommends docker-ce パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 以下の追加パッケージがインストールされます: containerd.io docker-ce-cli libltdl7 推奨パッケージ: aufs-tools cgroupfs-mount | cgroup-lite git pigz 以下のパッケージが新たにインストールされます: containerd.io docker-ce docker-ce-cli libltdl7 アップグレード: 0 個、新規インストール: 4 個、削除: 0 個、保留: 3 個。 29.9 MB のアーカイブを取得する必要があります。 この操作後に追加で 148 MB のディスク容量が消費されます。 取得:1 https://download.docker.com/linux/raspbian stretch/edge armhf containerd.io armhf 1.2.0-1 [10.7 MB] 取得:2 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf libltdl7 armhf 2.4.6-2 [386 kB] 取得:3 https://download.docker.com/linux/raspbian stretch/edge armhf docker-ce-cli armhf 5:18.09.0~3-0~raspbian-stretch [8,092 kB] 取得:4 https://download.docker.com/linux/raspbian stretch/edge armhf docker-ce armhf 5:18.09.0~3-0~raspbian-stretch [10.8 MB] 29.9 MB を 8秒 で取得しました (3,628 kB/s) 以前に未選択のパッケージ containerd.io を選択しています。 (データベースを読み込んでいます ... 現在 34827 個のファイルとディレクトリがイン ストールされています。) .../containerd.io_1.2.0-1_armhf.deb を展開する準備をしています ... containerd.io (1.2.0-1) を展開しています... 以前に未選択のパッケージ libltdl7:armhf を選択しています。 .../libltdl7_2.4.6-2_armhf.deb を展開する準備をしています ... libltdl7:armhf (2.4.6-2) を展開しています... 以前に未選択のパッケージ docker-ce-cli を選択しています。 .../docker-ce-cli_5%3a18.09.0~3-0~raspbian-stretch_armhf.deb を展開する準備をし ています ... docker-ce-cli (5:18.09.0~3-0~raspbian-stretch) を展開しています... 以前に未選択のパッケージ docker-ce を選択しています。 .../docker-ce_5%3a18.09.0~3-0~raspbian-stretch_armhf.deb を展開する準備をしてい ます ... docker-ce (5:18.09.0~3-0~raspbian-stretch) を展開しています... containerd.io (1.2.0-1) を設定しています ... Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service. libc-bin (2.24-11+deb9u3) のトリガを処理しています ... libltdl7:armhf (2.4.6-2) を設定しています ... man-db (2.7.6.1-2) のトリガを処理しています ... docker-ce-cli (5:18.09.0~3-0~raspbian-stretch) を設定しています ... docker-ce (5:18.09.0~3-0~raspbian-stretch) を設定しています ... update-alternatives: /usr/bin/dockerd (dockerd) を提供するために自動モードで /usr/bin/dockerd-ce を使います Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service. libc-bin (2.24-11+deb9u3) のトリガを処理しています ... + sudo -E sh -c docker version Client: Version: 18.09.0 API version: 1.39 Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:57:21 2018 OS/Arch: linux/arm Experimental: false Server: Docker Engine - Community Engine: Version: 18.09.0 API version: 1.39 (minimum version 1.12) Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:17:57 2018 OS/Arch: linux/arm Experimental: false If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker bin Remember that you will have to log out and back in for this to take effect! WARNING: Adding a user to the "docker" group will grant the ability to run containers which can be used to obtain root privileges on the docker host. Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface for more information. そして、Dockerをインストールできました! Raspbianを再インストールしたからでしょうか、、、 回答、ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問