深度系统如何安装docker?
Tofloor
poster avatar
simon_zhang
deepin
2017-05-16 16:34
Author
按照docker官网的提示,按照ubuntu安装的方式,都失败了,提示找不到需要install的docker-ce包。


谁成功过?提示一下我。
Reply Favorite View the author
All Replies
pikachuhy
deepin
2017-05-16 17:20
#1
用sudo apt-get install 可以装上吗?
Reply View the author
打击越
deepin
2017-05-16 17:51
#2
当然 可以了。看图:
Reply View the author
134******40
deepin
2017-05-16 19:09
#3
本帖最后由 jdocker 于 2017-5-30 21:43 编辑

深度官方deepin已经集成了docker,不过不是docker-ce这样的最新版。要想使用最新版可以参考官网debian安装教程安装,不过由于深度在定制过程中进行了大量修改,所以使用官方教程是安装不成功的。具体需要几个地方进行调整。先说说安装步骤:
1、如果以前安装过老版本,可以先卸载以前版本:
  
  1. sudo apt-get remove docker docker-engine
Copy the Code

2、先安装docker-ce与密钥管理与下载相关的依赖库,如curl命令、add-apt-repository、(这里必须选择wheezy版本的依赖库,如果选择jessie版本的依赖库安装,则无法安装docker密钥,而deepin是基于jessie的,这才显得奇怪)更正:这里还需要software-properties-common包提供add-apt-repository工具。
  
  1. sudo apt-get install apt-transport-https ca-certificates curl python-software-properties software-properties-common
Copy the Code

3、下载并安装密钥。
  1. curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Copy the Code

4、查看密钥是否安装成功
  1. sudo apt-key fingerprint 0EBFCD88
Copy the Code

如果安装成功,会出现如下内容:
  1. pub   4096R/0EBFCD88 2017-02-22              Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88  
  2.   uid     Docker Release (CE deb)   
  3.   sub   4096R/F273FCD8 2017-02-22
Copy the Code

5、添加docker官方仓库
  1. sudo add-apt-repository   "deb [arch=amd64] https://download.docker.com/linux/debian   wheezy   stable"
Copy the Code

Note:这点很奇怪,官方在 wheezy 位置使用的是${lsb_release -cs} ,而在deepin下执行lsb_release -cs这个命令时,而deepin显示的是unstable,而默认debian显示的是jessie或者wheezy这个如果在sudo apt-get update更新时就不起作用。
6、更新仓库
  
  1. sudo apt-get update
Copy the Code

7、安装docker-ce。这个时间要慢慢等待,有下载失败的可能性,因为速度很慢。如果断掉了,下载就失败了。如果下载失败,可以多试几次或者找个合适的时间点继续这一步。
  
  1. sudo apt-get install docker-ce
Copy the Code

安装完成了。剩下的工作就不知道了,因为我也没玩过docker-ce。
安装成功截图:




Reply View the author
catbb49294929
deepin
2017-05-17 00:05
#4
curl -sSL https://get.docker.com/ | sh

一句话的事。
Reply View the author
guoshuang
deepin
2017-05-17 01:28
#5
sudo apt-get install docker-compose docker-engine
一条命令的事。

之后,sudo gpasswd -a  yourname  docker ;
常用命令:
docker ps -a  
docker images  // docker rmi -f dcfdd642f73a

还有docker compose:
cat  docker-compose.yml
jenkins:
    container_name: jeknins
    image: jenkinsci/jenkins:2.17
    ports:
        - "8082:8080"
        - "50000:50000"
    environment:
        - JAVA_OPTS=-Duser.timezone=Asia/Shanghai
    restart: always
    command: /usr/sbin/sshd -D
    volumes:
        - /etc/localtime:/etc/localtime:rw
直接: docker-compose up -d  (运行docker container)





Reply View the author
noparkinghere
deepin
2017-05-17 16:32
#6
安装方法和 debian/ubuntu 应该一样吧,没实际试过。
Reply View the author
iminto
deepin
2017-11-04 09:00
#7
https://bbs.deepin.org/post/139514
sudo apt-get install docker-compose docker-engine
一条命令的事。

这个的版本太老了,已经过时了
Reply View the author
152******22
deepin
2017-11-30 22:56
#8
本帖最后由 zslzxc 于 2017-11-30 14:57 编辑

谢谢4楼,已经安装
Reply View the author
176******80
deepin
2017-11-30 23:16
#9
如果不要求最新版,apt  install docker.io 可以一键安装。Docker version 1.13.1
Reply View the author
yxiao
deepin
2017-11-30 23:37
#10
直接
  1. wget -qO- https://get.docker.com/ | sh
Copy the Code
就Ok了
Reply View the author
yxiao
deepin
2017-11-30 23:39
#11
本帖最后由 yxiao 于 2017-11-30 16:02 编辑

docker_install.pdf
Reply View the author
Comments
simon_zhang
2017-12-01 00:22
看似很强
zouqilin
deepin
2017-12-01 00:18
#12
  1. sudo apt-get update && sudo apt-get install docker.io
Copy the Code
Reply View the author
ifeng
deepin
2018-05-23 01:37
#13
https://bbs.deepin.org/post/139514
深度官方deepin已经集成了docker,不过不是docker-ce这样的最新版。要想使用最新版可以参考官网debian安装 ...

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
curl: (7) Failed to connect to 127.0.0.1 port 39889: 拒绝连接
gpg: no valid OpenPGP data found.
Reply View the author
134******40
deepin
2018-05-26 18:33
#14
https://bbs.deepin.org/post/139514
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
curl: (7) Failed to c ...

如果使用官方下载,就会出现周期性断网或者某段时间不能下载,你需要找另外时间下载或者更换中国阿里云的docker源。
Reply View the author
134******40
deepin
2018-05-26 18:35
#15
https://bbs.deepin.org/post/139514
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
curl: (7) Failed to c ...

使用阿里云的源安装吧:
https://yq.aliyun.com/articles/1 ... gcont7695.11.ExyqD4
使用ubuntu的那个。
Reply View the author
iminto
deepin
2018-05-26 19:42
#16
深度魔改太多,和主流的Linux桌面Ubuntu(毋庸置疑的Linux主流桌面)无法适配(很容易造成DDE被卸载等),软件维护又跟不上,感觉迟早要凉
Reply View the author