Deepin系统安装docker

Deepin系统安装docker

因为deepin是基于debian发行版的一个操作系统,所以我们deepin用户安装docker可以直接按照下面这个官方教程来安装,不过由于deepin的特殊性,在第三步会遇到点问题,这里主要记录一下问题得解决办法,先看一下会出问题的这步:

3 Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
Note: The lsb_release -cs sub-command below returns the name of your Debian distribution, such as helium. Sometimes, in a distribution like BunsenLabs Linux, you might need to change $(lsb_release -cs) to your parent Debian distribution. For example, if you are using BunsenLabs Linux Helium, you could use stretch. Docker does not offer any guarantees on untested and unsupported Debian distributions.
$ sudo add-apt-repository
“deb [arch=amd64] https://download.docker.com/linux/debian
$(lsb_release -cs)
stable”

sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable”

这条命令主要就是在我们的软件源列表里加一行docker的源,执行这条命令的时候会报错,我们通过lsb_release -cs命令可以看到我们的系统发行版信息,得到结果是 stable ,因为目前docker官方并没有针对stable的版本,所以我选择手动添加一下源,直接编辑 /etc/apt/sources.list

sudo vim /etc/apt/sources.list  
#文件最后添加一行 
deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch stable 
# :qw 保存退出

然后就是继续按照官方文档操作就行

 sudo apt-get update # 更新源
 sudo apt-get install docker-ce docker-ce-cli containerd.io # 安装
 sudo docker run hello-world  # 测试一下有没有问题

安装完成

  • 6
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值