深度优先

这个家伙好懒,除了文章什么都没留下

0%

【树莓派】安装docker

安装

  • 更新

    1
    sudo apt update && sudo apt dist-upgrade 
  • 接下来,安装Docker

    1
    curl -sSL https://get.docker.com | sh
  • 但是,由于未安装Docker,因此发生错误。检查配置文件

    1
    2
    # /etc/apt/sources.list.d/docker.list
    deb [arch=armhf] http://download.docker.com/linux/raspbian 10 stable
  • 它已成为。在撰写本文时,Docker为树莓派提供了jessie和strech。 由于这是不可避免的,因此让我们更改Docker提供的debian / buster的设置并进行安装。

    1
    2
    # /etc/apt/sources.list.d/docker.list
    deb [arch=armhf] http://download.docker.com/linux/debian buster stable
    1
    sudo apt update && sudo apt install docker-ce docker-ce-cli
  • Docker依赖的aufs-dkms导致安装失败。

    1
    2
    3
    4
    Error! Bad return status for module build on kernel: 4.19.50+ (armv7l)
    Consult /var/lib/dkms/aufs/4.19+20190211/build/make.log for more information.
    dpkg: error processing package aufs-dkms (--configure):
    installed aufs-dkms package post-installation script subprocess returned error exit status 10
  • 检查包装状态

    1
    sudo dpkg --audit
  • 显然,它在“配置”中失败,因此请删除有问题的文件

    1
    2
    sudo rm /var/lib/dpkg/info/aufs-dkms.postinst
    sudo rm /var/lib/dpkg/info/aufs-dkms.prerm
  • 然后,再次配置

    1
    sudo dpkg --configure aufs-dkms
  • 该错误现已解决。最后,检查Docker的操作

    1
    $ sudo docker run hello-world
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    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/

    好了

参考

https://qiita.com/yukari-n/items/d1b17bd37036f120153c