arm版ubuntu安装docker

安装 docker 卸载旧的 docker

1
sudo apt remove docker docker-engine docker-ce docker.io

安装依赖包

1
sudo apt update && apt install -y apt-transport-https ca-certificates curl software-properties-common

添加 docker 密钥

1
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

4、添加 Docker 源(阿里云),若下载 amd 版本改为[arch=amd64]

1
sudo add-apt-repository "deb [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

5. 安装 docker

1
sudo apt update && apt install -y docker-ce
  1. 查看 Docker 状态
1
sudo systemctl status docker && docker -v && docker ps

安装 Docker Compose

1、下载最新的 Docker Compose 二进制文件

1
sudo curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

2、授予执行权限

1
sudo chmod +x /usr/local/bin/docker-compose

3、验证安装

1
docker-compose --version
Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up