deepin系统安装Docker教程

deepin系统安装Docker教程

1、安装必要的系统工具
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common


2、安装GPG证书
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -


3、添加Docker软件源
sudo vim /etc/apt/sources.list
输入:deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian buster stable


4、安装Docker
sudo apt-get update
sudo apt-get -y install docker-ce


5、更换Docker镜像源
sudo mkdir -p /etc/docker
sudo vim /etc/docker/daemon.json

输入:
{"data-root": "/home/xshhe/workspace/docker","registry-mirrors": ["https://docker.1panel.live", "https://docker.unsee.tech", "https://hub.littlediary.cn"]}
“”引号内为第三方docker加速源,经常无法访问,可根据个人情况自行更换,此处编辑错误,会导致docker无法启动!


6、启动Docker服务
sudo systemctl start docker


7、查询Docker服务状态
sudo systemctl status docker

8、将当前用户添加到docker组
sudo usermod -aG docker $USER 
newgrp docker

注:解决拉取镜像时permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock报错问题

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值