docker安装
- 更新包管理器
sudo apt-get update
- 安装依赖包
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
- 添加 Docker 的官方 GPG 密钥
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- 设置 Docker 仓库
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- 安装 Docker Engine
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- 验证是否安装成功
docker
docker安装镜像包
- 因为一些原因docker直接拉取镜像包不行了,这里我用的是阿里云的,需要登陆阿里云平台。
标签:sudo,get,gpg,apt,etc,docker,安装 From: https://www.cnblogs.com/niexianda/p/18442298https://cr.console.aliyun.com/cn-hongkong/instances/mirrors
按照操作文档设定即可