飞腾派安装docker

发布时间:2025-06-11

1. 安装curl命令

sudo apt-get install curl

示例:

user@Phytium-Pi:~$ sudo apt-get install curl

[sudo] user 的密码:

正在读取软件包列表... 完成

正在分析软件包的依赖关系树      

正在读取状态信息... 完成      

curl 已经是最新版 (7.68.0-1ubuntu2.25)。

2. 一键安装docker,安装需要一段时间,取决于网络质量。

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

示例:

user@Phytium-Pi:~$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

# Executing docker install script, commit: 4c94a56999e10efcf48c5b8e3f6afea464f9108e

Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is

why we're displaying this warning and provide the opportunity to cancel the

installation.

If you installed the current Docker package using this script and are using it

again to update Docker, you can ignore this message, but be aware that the

script resets any custom changes in the deb and rpm repo configuration

files to match the parameters passed to the script.

You may press Ctrl+C now to abort this script.

+ sleep 20

+ sudo -E sh -c apt-get -qq update >/dev/null

[sudo] user 的密码:

+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ca-certificates curl >/dev/null

+ sudo -E sh -c install -m 0755 -d /etc/apt/keyrings

+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" -o /etc/apt/keyrings/docker.asc

+ sudo -E sh -c chmod a+r /etc/apt/keyrings/docker.asc

+ sudo -E sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu focal stable" > /etc/apt/sources.list.d/docker.list

+ sudo -E sh -c apt-get -qq update >/dev/null

+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null

+ sudo -E sh -c docker version

Client: Docker Engine - Community

Version:           27.5.1

API version:       1.47

Go version:        go1.22.11

Git commit:        9f9e405

Built:             Wed Jan 22 13:41:21 2025

OS/Arch:           linux/arm64

Context:           default

Server: Docker Engine - Community

Engine:

 Version:          27.5.1

 API version:      1.47 (minimum version 1.24)

 Go version:       go1.22.11

 Git commit:       4c9b3b0

 Built:            Wed Jan 22 13:41:21 2025

 OS/Arch:          linux/arm64

 Experimental:     false

containerd:

 Version:          1.7.25

 GitCommit:        bcc810d6b9066471b0b6fa75f557a15a1cbf31bb

runc:

 Version:          1.2.4

 GitCommit:        v1.2.4-0-g6c52b3f

docker-init:

 Version:          0.19.0

 GitCommit:        de40ad0

================================================================================

To run Docker as a non-privileged user, consider setting up the

Docker daemon in rootless mode for your user:

   dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.

To run the Docker daemon as a fully privileged service, but granting non-root

users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent

        to root access on the host. Refer to the 'Docker daemon attack surface'

        documentation for details: https://docs.docker.com/go/attack-surface/

================================================================================

3. 查看版本Sudo docker version

示例:

user@Phytium-Pi:~$ sudo docker version

Client: Docker Engine - Community

Version:           27.5.1

API version:       1.47

Go version:        go1.22.11

Git commit:        9f9e405

Built:             Wed Jan 22 13:41:21 2025

OS/Arch:           linux/arm64

Context:           default

Server: Docker Engine - Community

Engine:

 Version:          27.5.1

 API version:      1.47 (minimum version 1.24)

 Go version:       go1.22.11

 Git commit:       4c9b3b0

 Built:            Wed Jan 22 13:41:21 2025

 OS/Arch:          linux/arm64

 Experimental:     false

containerd:

 Version:          1.7.25

 GitCommit:        bcc810d6b9066471b0b6fa75f557a15a1cbf31bb

runc:

 Version:          1.2.4

 GitCommit:        v1.2.4-0-g6c52b3f

docker-init:

 Version:          0.19.0

 GitCommit:        de40ad0

4. 执行docker run hello-world,确认能否跑容器。

docker run hello-world

示例:

user@Phytium-Pi:~$ sudo docker run hello-world

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.

   (arm64v8)

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/

5. 如果docker出错,清空docker命令。

systemctl stop docker

rm -rf /var/lib/docker

systemctl start docker


飞腾派V3 现货支持

飞腾派V3 现货发售,支持全四口USB 3.0接口,PWM智能调速散热风扇,国标/美标耳机自动识别等功能,售价649元包邮。

https://www.iceasy.com/product/1875487334855221250

飞腾派资料下载专区

提供飞腾派相关资料下载,包括开发板手册、开源项目文档等。

https://www.iceasy.com/cloud/Phytium?pid=1877646941793374213

开源口碑案例分享

可参考飞腾派开发板的用户评价和社区反馈。

https://www.iceasy.com/review/list

想要了解及购买萤火工场产品,请前往iCEasy商城品牌专区:

https://www.iceasy.com/firefly-workshop

iCEasy商城欢迎您的到来!