系统要求:需要一个64位的centos7操作系统和版本3.10或更高版本的Linux内核

开始安装:

uname -r       //查看内核版本
yum -y update   //更新系统更新到最新

#安装docker
yum install docker-engine

systemctl enable docker.service   //启用该服务
systemctl start docker   //启动docker

安装完成创建一个镜像到容器里测试下:

运行: docker run --rm hello-world

出现下面信息表示创建成功:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
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.
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 Hub account:
https://hub.docker.com

For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

查看本地镜像:

docker images

拉取镜像:
docker pull centos:7.2.1511

centos镜像官方地址:
https://hub.docker.com/_/centos/

 如果拉取镜像报下面提示,可以修改服务器的dns试下:

114.114.114.114   202.101.224.69

删除none镜像:

docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker stop
docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker rm
docker images|grep none|awk '{print $3 }'|xargs docker rmi 删除镜像参考文档地址:http://www.tuicool.com/articles/R7jMZfq
 

docker安装的更多相关文章

  1. 理解Docker(1):Docker 安装和基础用法

    本系列文章将介绍Docker的有关知识: (1)Docker 安装及基本用法 (2)Docker 镜像 (3)Docker 容器的隔离性 - 使用 Linux namespace 隔离容器的运行环境 ...

  2. 2. Docker - 安装

    一.Docker介绍 1. Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上, 也可以实现虚拟化. 容器时完全使用沙 ...

  3. Docker 安装部署

    Docker学习笔记 一.Ubuntu Docker 安装 (1).获取最新版本Docker安装包 lyn@lyn:/data/docker$ sudo wget -qO- https://get.d ...

  4. docker 安装

    Docker使用了一种叫AUFS的文件系统,这种文件系统可以让你一层一层地叠加修改你的文件,最底下的文件系统是只读的,如果需要修改文件,AUFS会增加一个可写的层(Layer),这样有很多好处,例如不 ...

  5. Docker安装及基本使用方法

    Docker安装 CentOS6上安装Docker # yum -y install epel-release # yum -y install docker-io CentOS7上安装Docker ...

  6. Mac 下 docker安装

    http://www.th7.cn/system/mac/201405/56653.shtml Mac 下 docker安装 以及 处理错误Cannot connect to the Docker d ...

  7. docker安装caffe

    [最近一直想要学习caffe,但是苦苦纠结于环境安装不上,真的是第一步都迈不出去,还好有docker的存在!下面,对本人如何利用docker安装caffe做以简单叙述,不属于教程,只是记录自己都做了什 ...

  8. Docker安装Gitlab

    一.Ubuntu16.4上Docker安装Gitlab 1.安装docker 参见:https://docs.docker.com/engine/installation/linux/ubuntuli ...

  9. 使用docker安装部署Spark集群来训练CNN(含Python实例)

    使用docker安装部署Spark集群来训练CNN(含Python实例) http://blog.csdn.net/cyh_24/article/details/49683221 实验室有4台神服务器 ...

随机推荐

  1. MD5 32位 小写加密和大写加密

    /** * MD5加密方法 */ public static String MD5(String str) { MessageDigest md5 = null; try { md5 = Messag ...

  2. Java 判断文件夹、文件是否存在、否则创建文件夹

    1.判断文件是否存在,不存在创建文件 File file=new File("C:\\Users\\QPING\\Desktop\\JavaScript\\2.htm"); if( ...

  3. LAMP_01_Win下安装配置MySql

    1.解压Mysql server到D盘配置环境变量MYSQL_HOME      D:\J2EE\apache-ant-1.9.7PATH            %MYSQL_HOME%\bin; 2 ...

  4. Mware vCenter Server 识别固态硬盘为(非SSD)是什么原因?

    人工定义一下: 用root登录进ESXi控制台:esxcli storage nmp device list #列出储存清单esxcli storage nmp satp rule add -s VM ...

  5. selenium 介绍1

    本文主要是吸收这些帖子的营养,多谢互联网,和未知名作者. http://www.ltesting.net/ceshi/open/kygncsgj/selenium/2011/1009/203318.h ...

  6. Linux下的shell编程(三)BY 四喜三顺

    正则表达式:-------------------------------------------------------------------------------------------^   ...

  7. Nice Validator(Form验证)及Juery zTree控件

    http://niceue.com/validator/demo/match.php http://www.ztree.me/v3/demo.php#_603

  8. SpringBoot读取配置文件

    项目结构 pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:// ...

  9. WebService 用法

           上文详细讨论了MQ的使用方法,MQ作为一种信息存储机制,将消息存储到了队列中,这样在做分布式架构时可以考虑将消息传送到MQ服务器上,然后开发相应的服务组件获取MQ中的消息,自动获取传送的 ...

  10. for 小曦

    安装GO 当前版本1.6.2 http://blog.163.com/hehaifeng1984@126/blog/static/690011362013101044011568/ 教程 https: ...