ラズパイに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ページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。

回答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
総合スコア1825
あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/25 08:35