本文适用于甲骨文 Ubuntu aarch64架构的服务器,理论上所有aarch64架构均可参考本文
首先确认你的服务器是 aarch64 架构,可以使用命令
uname -m
检查。root@instance-20230830-0940:~# uname -m aarch64
安装 Docker 依赖项
sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
添加 Docker GPC 秘钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
添加 Docker 源
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
更新软件包库并安装 Docker
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
验证是否安装正确
sudo docker run hello-world
root@instance-20230830-0940:~# sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 70f5ac315c5a: Pull complete Digest: sha256:88ec0acaa3ec199d3b7eaf73588f4518c25f9d34f58ce9a0df68429c5af48e8d Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly.
评论区