【Docker】Docker安装
·
🌈个人主页:秦jh__https://blog.csdn.net/qinjh_?spm=1010.2135.3001.5343
🔥 系列专栏:Docker_秦jh_的博客-CSDN博客
目录
前言
💬 hello! 各位铁子们大家好哇。
今日更新了Docker相关内容
🎉 欢迎大家关注🔍点赞👍收藏⭐️留言📝
Server 版本安装
Ubuntu 安装
安装依赖
# 1. 先安装基础依赖
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
# 2. 创建目录
sudo mkdir -p /etc/apt/keyrings
# 3. 使用阿里云镜像下载GPG密钥(比官方源稳定)
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
# 4. 添加阿里云Docker源
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# 5. 更新并安装
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
自动启动配置
#配置加载
sudo systemctl daemon-reload
#启动服务
sudo systemctl start docker
#开启启动
sudo systemctl enable docker
#查看服务状态
sudo systemctl status docker
更多推荐


所有评论(0)