删除原有的docker应用(如果有的话):

sudo apt-get remove docker docker-engine docker.io

更新一下:

sudo apt-get update

下载支持 https 的相关依赖:

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common

下载docker的官方gpg密钥:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

添加apt仓库:

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

再更新一下:

sudo apt-get update

下载docker ce版本:

sudo apt-get install docker-ce

为了认证docker安装好了,要记得跑一下hello world程序哦:

sudo docker run hello-world

提示如下信息,说明安装docker成功了:

zifeiy@zifeiy-S1:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9db2ca6ccae0: Pull complete
Digest: sha256:4b8ff392a12ed9ea17784bd3c9a8b1fa3299cac44aca35a85c90c5e3c7afacdc
Status: Downloaded newer image for hello-world:latest Hello from Docker!
This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal. To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

参考链接:Docker官方文档

最新文章

  1. struts2学习笔记--使用servletAPI实现ajax的一个小Demo
  2. VS报错:The build tools for v140 (Platform Toolset = 'v140') cannot be found
  3. ubunt tmux X Error of failed request
  4. 【Avalon源码】iterator
  5. POJ1265——Area(Pick定理+多边形面积)
  6. jtree(选择框)
  7. syslog_test.c 简单的syslog函数
  8. 一种无new创建对象的方法
  9. 【angular】angular实现简单的tab切换
  10. javascript焦点图自动缓冲滚动
  11. /etc/fstab最后3个字段详解
  12. 分享用于学习C++音频处理的代码示例
  13. 面试-java算法题
  14. Python内置函数(8)——bool
  15. pom.xml文件模板、application文件模板、configuration逆向生成文件、
  16. 即时通信 选择UDP还是TCP协议
  17. Luogu3191 HNOI2007 紧急疏散 二分答案、最大流
  18. 【数据分析方法论】指标_DAU/MAU
  19. 精通Web Analytics 2.0 (13) 第十一章:变身分析忍者的指导原则
  20. 常用sql 全记录(添加中)

热门文章

  1. zznu-oj-2117 : 我已经在路上了(求函数的原函数的字符串)--【暴力模拟题,花式模拟题,String大法好】
  2. css选择器学习(一)
  3. 利用tycho插件自动生成pom文件
  4. 表达式* ptr ++和++ * ptr是否相同?
  5. C/C++系列之复杂引用
  6. 一个奇怪的方法解决华为ENSP模拟器路由器启动后命令行一直“#”的问题
  7. js里url里有特殊字符(如&)情况,后台request.getParameter("url")里&变成&
  8. scrapy框架之Selectors选择器
  9. 【CF589 E】Another Filling the Grid
  10. C#程序调用CMD执行命令,将参数传递给cmd.exe