1.使用官方推荐的方式安装 yum-utils
yum install -y yum-utils
2.使用如下的命令设置稳定版的 repository
yum-config-manager \
          --add-repo \
          https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repo

出现错误Loaded plugins: fastestmirror, refresh-packagekit

更改文件:
    1.vim  /etc/yum/pluginconf.d/fastestmirror.conf
        enabled=0
    2. vim /etc/yum.conf
        plugins=0

更新yum
    yum makecache fast

3.创建文件
    vim /etc/yum.repos.d/docker.repo
输入以下内容
    [dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

4.安装最新版本的docker

yum -y install docker-engine

5.启动docker
    service docker start

6.使用docker
    docker  run hello-world

可以使用service docker status查看状态
发现错误
Cannot connect to the Docker daemon at 。。。

查看进程出现

docker dead but pid file exists

删除/var/run 下面的docker.xx文件均没用

使用以下方法:
yum-config-manager --enable public_ol6_latest
yum install device-mapper-event-libs
参考 http://stackoverflow.com/questions/27216473/docker-1-3-fails-to-start-on-rhel6-5

正常启动显示docker (pid  2295) is running...

测试docker

[root@localhost run]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from hello-world
65b27d3bd74d: Pull complete
9f5834b25059: Pull complete
Digest: sha256:fb158b7ad66f4d58aa66c4455858230cd2eab4cdf29b13e5c3628a6bfc2e9f05
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:

完成

安装docker以及问题解决办法的更多相关文章

  1. centos6.5下安装docker的过程办法

    转载:https://www.cnblogs.com/tymagic/p/10794477.html 在看了网上N多复制粘贴的文章,又尝试无效后,我把我最终成功的办法发出来,希望能帮到拼命干环境的你. ...

  2. 堡垒机-teleport的安装以及常见问题解决办法

    teleport是一款简单易用的堡垒机系统,运用在企业对windows.linux服务器的安全使用管理以及审计. 官网网址:http://teleport.eomsoft.net/ github地址: ...

  3. Tomcat下载安装及常见问题解决办法

    一.Tomcat的下载: 下载地址:http://tomcat.apache.org/ 下载Tomcat6.0(在左侧的Download下,考虑到稳定性现在企业大部分还在用Tomcat6.0) (1) ...

  4. centos6.5安装docker(亲测)

    centos6.5下安装docker的过程办法 在看了网上N多复制粘贴的文章,又尝试无效后,我把我最终成功的办法发出来,希望能帮到拼命干环境的你. 操作环境: centos6.5(Final) 内核: ...

  5. Windows下pip安装及更新出现“UnicodeEncodeError: 'ascii' codec can't encode character u'\u258c' in position 8: ordinal not in range(128)”问题解决办法

    Windows下pip安装及更新出现“UnicodeEncodeError: 'ascii' codec can't encode character u'\u258c' in position 8: ...

  6. VMware 安装提示缺少MicrosoftRuntime DLL 问题解决办法

    VMware 安装提示缺少MicrosoftRuntime DLL 问题解决办法 刚刚安装VMware失败了试了好多办法,在这总结一下. 下面是程序的截图 这是报错信息 网上的解决方法: 当出现安装失 ...

  7. CentOS7.X首次安装docker无法启动的问题解决

    CentOS7.2 随着Docker的不断流行与发展,docker公司(或称为组织)也开启了商业化之路,Docker 从 17.03版本之后分为 CE(Community Edition) 和 EE( ...

  8. centOS7安装docker遇到 [Errno 14] curl#35 - "TCP connection reset by peer问题解决

    ---------------------------------------------------------------------------------------------------- ...

  9. Linux中修改docker镜像源及安装docker

    1.首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.re ...

随机推荐

  1. i-83.net quadhost子产品

    i-83.net 6$一年, 首年半价, 优惠码: APR19-NAT50 加拿大 ---------------------------------------------------------- ...

  2. unix域数据报回射程序(不完整)

    一.服务器程序 int main(int argc, char **argv) { int sockfd; struct sockaddr_un servaddr, cliaddr; sockfd = ...

  3. 利用JS写一个计算平方的网页

    <!-- 计算一个数的平方并显示出来 --> <!DOCTYPE html> <html> <head> <meta charset=" ...

  4. rcu-bp关键代码解读

    1      什么是TLS 原理在网上资料很多,这里不展开. 简单点说,动态申请的每线程变量.有一类比较熟悉的每线程变量是一个带__thread的每线程变量,两者的区别在于,TLS这类每线程变量是动态 ...

  5. Vue插槽的深入理解和应用

    一开始接触vue时并不知道插槽是什么,后来看了很多文章也是一知半解.然后自己手动敲了一下,在项目中实际应用一下,实在太好用了.后来做小程序后发现也能使用slot,不单单在vue中使用.我就是这么目光短 ...

  6. mysql8.0卸载干净--win10

    本文介绍,在Windows10系统下,如何彻底删除卸载MySQL... 1>停止MySQL服务开始->所有应用->Windows管理工具->服务,将MySQL服务停止.2> ...

  7. 模拟登陆github

    import requests from lxml import etree class Login(object): def __init__(self): self.headers = { 'Re ...

  8. 【题解】魔板—洛谷P1275。

    话说好久没更博了. 最近学了好多知识懒的加进来了. 有幸认识一位大佬. 让我有了继续更博的兴趣. 但这是一个旧的题解. 我在某谷上早就发过的. 拿过来直接用就当回归了吧. 其实这道题有一个特别关键的思 ...

  9. pythonのdjango 缓存

    由于Django是动态网站,所有每次请求均会去数据进行相应的操作,当程序访问量大时,耗时必然会更加明显,最简单解决方式是使用:缓存,缓存将一个某个views的返回值保存至内存或者memcache中,5 ...

  10. C# 7.0特性

    一.out的形参变量无需再提前声明 befor: "; int numericResult; if (int.TryParse(input, out numericResult)) Cons ...