Ubuntu安装 docker
安装docker首先要需要一台宿主机, 我目前用VMvare下安装的Ubuntu16.04系统为宿主机,进行docker安装测试。
ubuntu安装时选的中文环境,生成的sources.list里面的源url主要是:cn.archive.ubuntu.com,这个可以从国内服务器下载一些信息,相对较快。
目前最新docker分为 docker-ce和docker-ee两个版本,其中ce为社区版免费的,ee为商业版商用的,目前测试用ce版本。
主要安装过程参考官方文档步骤,如下:
1、首次更新ubuntu
$ sudo apt-get update
2、安装linux-image-extra-* 包,这一步不可少,不然后面安装docker会从国外网址下载,一般被墙的下载不了, 也就安装不成功
$ sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
3、安装https
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
4、安装GPG key
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
5、验证 key的 fingerprint 为 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.
$ sudo apt-key fingerprint 0EBFCD88
上面命令输出信息为:
pub 4096R/0EBFCD88 2017-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid Docker Release (CE deb) <docker@docker.com>
sub 4096R/F273FCD8 2017-02-22
6、安装仓库
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
7、再次更新
$ sudo apt-get update
8、安装docker-ce,这一步我没有用国内源,所以下载很慢,下次发国内源的安装
$ sudo apt-get install docker-ce
9、上面执行完毕,docker应该算是安装完毕了,可以输入下面命令测试是否成功
$ sudo docker run hello-world
如果成功,则输出如下信息:

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.
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://cloud.docker.com/ For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

转自:https://www.cnblogs.com/windy-love/p/7059907.html
至此, docker的安装算是完成了,下面文章将创建容器并搭建jdk-tomcat-mysql的WEB运行环境。
Ubuntu安装 docker的更多相关文章
- ubuntu安装docker以及基本用法
ubuntu安装docker以及基本用法 一.安装 安装前先更新apt-get源到最新版本 apt-get update 使用ubuntu自带的docker安装包安装docker apt-get in ...
- Ubuntu安装docker笔记
前言 根据参考文档简单记录Ubuntu系统安装docker的步骤 系统版本 panzi@ubuntu:~$ cat /etc/issue Ubuntu 16.04.5 LTS \n \l 移除旧版 ...
- 总结关于Ubuntu 安装 Docker 配置相关问题及解决方法
总结关于Ubuntu 安装 Docker 配置相关问题及解决方法 Tomcat 示例 软件镜像(xx安装程序)----运行镜像----产生一个容器(正在运行的软件,运行的xx): 步骤: 1.搜索镜像 ...
- ubuntu 安装 docker 并配置镜像加速(使用 apt-get 进行安装)
ubuntu 安装docker CentOS docker安装 https://blog.csdn.net/weixin_44953227/article/details/108597310 你需要这 ...
- Docker笔记--ubuntu安装docker
Docker笔记--ubuntu安装docker 1.更换国内软件源,推荐中国科技大学的源,稳定速度快(可选) sudo cp /etc/apt/sources.list /etc/apt/sourc ...
- 【1】ubuntu 安装docker
官方支持安装docker的Ubuntu版本: ubuntu trusty 14.04(LTS) (64位) ubuntu precise 12.04(LTS) (64位) ubuntu raring ...
- Ubuntu 安装 Docker CE(社区版)
参考自 https://yeasy.gitbooks.io/docker_practice/install/ubuntu.html#ubuntu-1604- docker-io 是以前早期的版本,版本 ...
- Ubuntu 安装 Docker CE
注:本文转载自<Docker入门> 警告:切勿在没有配置 Docker APT 源的情况下直接使用 apt 命令安装 Docker. 准备工作 系统要求 Docker CE 支持以下版本的 ...
- ubuntu安装Docker并部署selenium-grid
目录 一.docker安装 Ubuntu 1.检查内核版本大于3.10 2.更新apt源 3.安装docker 4.(建议)更新成国内源 5.启动.重启docker (可选)检查docker运行情况 ...
- Ubuntu安装Docker步骤
环境:Ubuntu Trusty 14.04 (LTS) 前提条件: Docker requires a 64-bit installation regardless of your Ubuntu v ...
随机推荐
- js 解决函数加载的问题
var queue = function(funcs, scope) { (function next() { if(funcs.length > 0 ...
- 在js里的ejs模板引擎使用
1.首先需要在页面里引用ejs.min.js. 2.将你的模板使用ejs编写,并存成后缀名.stmpl;(可能需要在打包工具里做些处理) 3.在js里使用require引入xxx.stmpl: con ...
- 厉害了,Google大神每天写多少行代码?
文章转自开源中国社区,编译自:Quora Quora上有个有趣的问题:Google工程师们每天写多少行代码? Google 的 AdMob 全栈工程师 Raymond Farias 在 Quora 发 ...
- Ecshop 商品详情页如何添加立即购买按钮
1,加到位置 <li class="add_cart_li"> <a href="javascript:addToCart1({$goods.goods ...
- 阿里云ECS服务安装 nginx+php+MariaDB完整版
安装 Nginx想在 CentOS 系统上安装 Nginx ,你得先去添加一个资源库,像这样: vim /etc/yum.repos.d/nginx.repo使用 vim 命令去打开 /etc/yum ...
- c#后台计算2个日期之间的天数差
/ 计算2个日期之间的天数差 DateTime dt1 = Convert.DateTime("2007-8-1"); DateTime dt2 = Convert.DateTi ...
- C#面试 笔试题 五
1.什么是受管制的代码? 答:unsafe:非托管代码.不经过CLR运行. 2.net Remoting 的工作原理是什么? 答:服务器端向客户端发送一个进程编号,一个程序域编号,以确定对象的位置. ...
- JavaScript 中的 Function.prototype.bind() 方法
转载自:https://www.cnblogs.com/zztt/p/4122352.html Function.prototype.bind()方法 bind() 方法的主要作用就是将函数绑定至某个 ...
- CSS-02 BFC的理解
两个概念 感觉BFC挺重要的,于是最近查阅网上资料后小结一下,如果有不对的地方还望指正. 先理解两个概念: BOX :盒子模型 Block-Leave Box :块级元素 display属性为bloc ...
- ubuntu-12.04.5-desktop-amd64 安装vmwaretools
百度文库地址:https://wenku.baidu.com/view/7c1cd211a216147917112820.html 注意:一定要把此文档中的vmwaretools 版本号换成你自己下载 ...