deepin_v20安装docker(解决lsb_release -cs 返回n/a的问题)
Tofloor
poster avatar
6***6@qq.com
deepin
2020-04-17 06:54
Author
本帖最后由 chen645800876 于 2020-4-16 23:00 编辑

由于深度的v20使用lsb_release的命令会返回n/a,导致添加docker仓库会报错
  1. $ lsb_release -cs
Copy the Code

原本是用阿里的仓库安装:
  1. # step 1: 安装必要的一些系统工具
  2. sudo apt-get update
  3. sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
  4. # step 2: 安装GPG证书
  5. curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
  6. # Step 3: 写入软件源信息
  7. sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs)  stable"
  8. # Step 4: 更新并安装Docker-CE
  9. sudo apt-get -y update
  10. sudo apt-get install docker-ce docker-ce-cli containerd.io
Copy the Code

因为官方说deepin_v20用的是最新的debian的稳定版,遂即上debian官网查了下,当前最新稳定版的版本号是buster

解决方案:将上面第三步中 $(lsb_release-cs) 替换成 buster

  1. sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian buster  stable"
Copy the Code


附:将普通用户添加到docker用户组,免root使用docker

  1. sudo gpasswd -a ${USER} docker
Copy the Code
注意:试了下,重启后用户组才会生效

Reply Favorite View the author
All Replies
avatar
neko
deepin
Ecological co-builder
Q&A Team
2020-04-17 16:32
#1
Reply View the author
avatar
herdde
deepin
2020-04-17 16:50
#2
neko 发表于 2020-4-17 08:32
https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script
docker官网的一键 ...

一键脚本安装的 docker怎么卸载?
Reply View the author
avatar
neko
deepin
Ecological co-builder
Q&A Team
2020-04-17 16:59
#3
https://bbs.deepin.org/post/191846
一键脚本安装的 docker怎么卸载?

sudo apt remove docker-ce
Reply View the author
avatar
les5332295
deepin
2020-05-06 03:59
#4
ninstall Docker Engine

    Uninstall the Docker Engine, CLI, and Containerd packages:

    $ sudo apt-get purge docker-ce docker-ce-cli containerd.io

Reply View the author