侧边栏壁纸
  • 累计撰写 10 篇文章
  • 累计创建 8 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Ubuntu aarch64架构安装docker

云大北
2023-11-15 / 0 评论 / 0 点赞 / 86 阅读 / 0 字
温馨提示:
本文最后更新于2023-11-15,若内容或图片失效,请留言反馈。 部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

本文适用于甲骨文 Ubuntu aarch64架构的服务器,理论上所有aarch64架构均可参考本文

  1. 首先确认你的服务器是 aarch64 架构,可以使用命令 uname -m 检查。

    root@instance-20230830-0940:~# uname -m
    aarch64
  2. 安装 Docker 依赖项

    sudo apt-get update
    sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
  3. 添加 Docker GPC 秘钥

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  4. 添加 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
  5. 更新软件包库并安装 Docker

    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io
  6. 验证是否安装正确 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.

评论区