安装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的更多相关文章

  1. ubuntu安装docker以及基本用法

    ubuntu安装docker以及基本用法 一.安装 安装前先更新apt-get源到最新版本 apt-get update 使用ubuntu自带的docker安装包安装docker apt-get in ...

  2. Ubuntu安装docker笔记

    前言   根据参考文档简单记录Ubuntu系统安装docker的步骤 系统版本 panzi@ubuntu:~$ cat /etc/issue Ubuntu 16.04.5 LTS \n \l 移除旧版 ...

  3. 总结关于Ubuntu 安装 Docker 配置相关问题及解决方法

    总结关于Ubuntu 安装 Docker 配置相关问题及解决方法 Tomcat 示例 软件镜像(xx安装程序)----运行镜像----产生一个容器(正在运行的软件,运行的xx): 步骤: 1.搜索镜像 ...

  4. ubuntu 安装 docker 并配置镜像加速(使用 apt-get 进行安装)

    ubuntu 安装docker CentOS docker安装 https://blog.csdn.net/weixin_44953227/article/details/108597310 你需要这 ...

  5. Docker笔记--ubuntu安装docker

    Docker笔记--ubuntu安装docker 1.更换国内软件源,推荐中国科技大学的源,稳定速度快(可选) sudo cp /etc/apt/sources.list /etc/apt/sourc ...

  6. 【1】ubuntu 安装docker

    官方支持安装docker的Ubuntu版本: ubuntu trusty 14.04(LTS) (64位) ubuntu precise 12.04(LTS) (64位) ubuntu raring ...

  7. Ubuntu 安装 Docker CE(社区版)

    参考自 https://yeasy.gitbooks.io/docker_practice/install/ubuntu.html#ubuntu-1604- docker-io 是以前早期的版本,版本 ...

  8. Ubuntu 安装 Docker CE

    注:本文转载自<Docker入门> 警告:切勿在没有配置 Docker APT 源的情况下直接使用 apt 命令安装 Docker. 准备工作 系统要求 Docker CE 支持以下版本的 ...

  9. ubuntu安装Docker并部署selenium-grid

    目录 一.docker安装 Ubuntu 1.检查内核版本大于3.10 2.更新apt源 3.安装docker 4.(建议)更新成国内源 5.启动.重启docker (可选)检查docker运行情况 ...

  10. Ubuntu安装Docker步骤

    环境:Ubuntu Trusty 14.04 (LTS) 前提条件: Docker requires a 64-bit installation regardless of your Ubuntu v ...

随机推荐

  1. 通过queue实现前端的被动接收

    一般请求都是由前端主动发起请求,后端响应,但有些情况必须要后端达到一定条件了才向前端相应数据,这就变成前端被动了.比如微信接收信息,只有别人给你发消息,你才能被动接收消息. 最近做了个项目,当有人经过 ...

  2. 简单的C++11线程池实现

    线程池的C++11简单实现,源代码来自Github上作者progschj,地址为:A simple C++11 Thread Pool implementation,具体博客可以参见Jakob's D ...

  3. vsphere虚拟化之 NTP服务的创建(三)

    1.先修改windows 2012的注册表. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\ 设置 Annou ...

  4. JavaScript LinkedList

    function LinkedList() { var Node = function(element) { this.element = element; this.next = null } va ...

  5. JAVA线程初体验

    线程的创建 线程的启动和停止 /** * 演员类 继承Thread类 * @author Administrator * */ public class Actor extends Thread { ...

  6. ES6 find 和 filter 的区别

    ES6 find 和 filter 的区别 : 遇到个功能是要分类就想说在前端过滤,不要从查数据库的时候过滤了.然后就想说除了filter还有啥好用的 发现有个find,测试一番之后发现 const ...

  7. 问题 1436: 地宫取宝 (dp)

    题目传送门 时间限制: 1Sec 内存限制: 128MB 提交: 423 解决: 94 题目描述 X  国王有一个地宫宝库.是  n  x  m  个格子的矩阵.每个格子放一件宝贝.每个宝贝贴着价值标 ...

  8. struts2 基础学习

      Struts 2是在WebWork2基础发展而来的. 注意:struts 2和struts 1在代码风格上几乎不一样. Struts 2 相比Struts 1的优点: 1.在软件设计上Struts ...

  9. 安卓构架组件——概述 Android Architecture Components

    谷歌官文文档地址:https://developer.android.google.cn/topic/libraries/architecture 安卓构架组建是库的集合:帮助你设计健壮的.易测试的. ...

  10. 2019-9-2-win10-uwp-打电话

    title author date CreateTime categories win10 uwp 打电话 lindexi 2019-09-02 12:57:38 +0800 2018-2-13 17 ...