[root@test ~]# yum update

[root@test ~]# yum install docker

[root@test ~]# service docker start

Redirecting to /bin/systemctl start  docker.service

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

[root@test ~]# systemctl status docker.service

● docker.service - Docker Application Container Engine

Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)

Active: inactive (dead) (Result: exit-code) since 四 2016-03-10 13:01:21 CST; 7s ago

Docs: http://docs.docker.com

Process: 29939 ExecStart=/usr/bin/docker daemon $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=2)

Main PID: 29939 (code=exited, status=2)

CGroup: /system.slice/docker.service

└─29970 mkfs.ext4 -E nodiscard,lazy_itable_init=0,lazy_journal_ini...

3月 10 13:01:20 test.mayocase.com systemd[1]: Failed to start Docker Applic....

3月 10 13:01:20 test.mayocase.com systemd[1]: Unit docker.service entered f....

3月 10 13:01:20 test.mayocase.com systemd[1]: docker.service failed.

3月 10 13:01:21 test.mayocase.com systemd[1]: docker.service holdoff time o....

Hint: Some lines were ellipsized, use -l to show in full.

[root@test ~]#

使用yum install docker安装完后启动不了

[root@apptest ~]# service docker start
Redirecting to /bin/systemctl start  docker.service

一直停留在以上步骤

可以使用以下命令来安装,即可成功。

一个问题让我折腾了两天,试过关闭防火墙,关闭selinux,重装系统,等等网上能查到的方法都解决不了。

如果大家解决了,回复感谢下我吧。

[root@apptest ~]# yum remove docker
[root@apptest ~]# yum remove docker-selinux
 
[root@test yum.repos.d]# vi  /etc/yum.repos.d/docker.repo
 
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
 
[root@test yum.repos.d]# yum install docker-engine
 
已安装:
  docker-engine.x86_64 0:1.10.2-1.el7.centos                                    
 
作为依赖被安装:
  docker-engine-selinux.noarch 0:1.10.2-1.el7.centos   
 
[root@apptest ~]# service docker start
Redirecting to /bin/systemctl start  docker.service
[root@apptest ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
 
[root@test yum.repos.d]# docker version
Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 16:16:33 2016
 OS/Arch:      linux/amd64
 
Server:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 16:16:33 2016
 OS/Arch:      linux/amd64
[root@test yum.repos.d]# 
 
或者使用以下方法
 
[root@apptest ~]# curl -fsSL https://get.docker.com/ | sh
+ sh -c 'sleep 3; yum -y -q install docker-engine'
警告:/var/cache/yum/x86_64/7/docker-main-repo/packages/docker-engine-selinux-1.10.2-1.el7.centos.noarch.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID 2c52609d: NOKEY
docker-engine-selinux-1.10.2-1.el7.centos.noarch.rpm 的公钥尚未安装
导入 GPG key 0x2C52609D:
 用户ID     : "Docker Release Tool (releasedocker) <docker@docker.com>"
 指纹       : 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d
 来自       : https://yum.dockerproject.org/gpg
setsebool:  SELinux is disabled.
+ sh -c 'docker version'
Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 16:16:33 2016
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
 
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
 
  sudo usermod -aG docker your-user
 
Remember that you will have to log out and back in for this to take effect!
 
[root@apptest ~]# 
 
[root@apptest ~]# service docker start
Redirecting to /bin/systemctl start  docker.service
[root@apptest ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[root@apptest ~]# 
 

官方网址可查

https://docs.docker.com/engine/installation/linux/centos/

 
 

CentOS7安装docker 启动不了解决篇的更多相关文章

  1. 【运维技术】VM虚拟机上使用centos7安装docker启动gogs服务教程【含B站视频教程】

    VM虚拟机上使用centos7安装docker启动gogs服务视频教程 BiliBili视频教程链接飞机票,点我 使用VMware Workstation安装Centos7 MinMal系统 第一步: ...

  2. Centos7安装Docker 基于Dockerfile 搭建httpd运行环境

    Centos7安装Docker 基于Dockerfile 搭建httpd运行环境 docker docker搭建 docker build 本文档完成目标内容如下 使用Docker搭建http服务器一 ...

  3. centos7安装 docker

    centos7安装 docker 切换到 root用户,执行: [root@localhost frinder]# yum install docker已加载插件:fastestmirror, lan ...

  4. centos install docker setup centos7 安装docker

    centos7 安装docker 1: 安装必要的一些系统工具sudo yum install -y yum-utils device-mapper-persistent-data lvm2 2: 添 ...

  5. 获取Centos7安装Docker各种姿势(指定版本)(转载)

    Centos7安装docker社区(CE)版 官网指导:https://docs.docker.com/engine/installation/linux/docker-ce/centos/#inst ...

  6. CentOS7安装docker 18.06

    原文:CentOS7安装docker 18.06 一.CentOS Docker 安装 参考docker 官方网站:https://docs.docker.com/install/linux/dock ...

  7. centos7 安装docker(手动和脚本安装)换源 卸载

    centos7 安装docker(手动和脚本安装)换源 卸载 Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker ...

  8. Docker学习笔记(1):CentOS7安装Docker

    Docker是一个基于Go语言实现的开源应用容器引擎,通过对应用组件的封装.分发.部署.运行等生命周期的管理,使程序及其运行环境能够做到"一次封装,到处运行". Docker架构 ...

  9. 【Docker】 CentOS7 安装 Docker 及其使用方法 ( 一 )

    系列目录: [Docker] CentOS7 安装 Docker 及其使用方法 ( 一 ) [Docker] 使用Docker 在阿里云 Centos7 部署 MySQL 和 Redis (二) [D ...

随机推荐

  1. 写具有良好风格的ABAP代码

    编程风格是一个经久不衰的话题,大家所公认的事实是:一个良好的编程风格会带来很多的好处.而对于“良好”的标准,则众说纷纭,莫衷一是.编程风格在ABAP程序中当然也有着重要的意义,因为很少看到专门针对AB ...

  2. SDN学习之Mininet验证OpenFlow协议版本

    最近学习如何使用mininet,但是,刚刚开始时一直无法知道如何查看OpenFlow协议的版本,通过查阅网上的资料,从SDNLAB中,学习到了如何验证,mininet自身基于OpenFlow13版本的 ...

  3. protobuf那些事

    大家好,俺又来写博客了.......上次剧情预告说,这次会写hive的博客.......好吧,那俺就不打算写hive了.......老码农路子就是要野(本人不老,不能说得影响了找女票)......这次 ...

  4. javaScript 设计模式系列之一:观察者模式

    介绍 观察者模式又叫发布订阅模式(Publish/Subscribe),一个目标对象管理所有相依于它的观察者对象.该模式中存在两个角色:观察者和被观察者.目标对象与观察者之间的抽象耦合关系能够单独扩展 ...

  5. Android零碎知识(一)

    public abstract Resources getResources () Return a Resources instance for your application's package ...

  6. LR11关联问题

    LR11关联问题       最近,我在录制一份脚本在回放的时候报错,错误图如下: 很自然地我想到了关联,于是我再录制了一份脚本.我对比了一下ActionID=45322984确实是两个脚本不一样的地 ...

  7. 树莓派控制GPIO(Python)

    如果你的raspi没有安装python那么先   sudo apt-get update sudo apt-get install python-dev   例如想要控制35管脚的亮灭: 先建一个文本 ...

  8. 面试(4)-spring-Spring面试题和答案

    1:69道Spring面试题和答案 转自:http://ifeve.com/spring-interview-questions-and-answers/ 目录 Spring 概述 依赖注入 Spri ...

  9. 10分钟学会JAVA注解(annotation)

    (原) 先认识注解(Annotation) 定义类用class,定义接口用interface,定义注解用@interface 如public @interface AnnotationTest{} 所 ...

  10. Spring与Mybatis整合

    一 概述 1.整合的目的 将Mapper映射器的创建任务交给Spring容器. 二 具体实现 1.创建sqlSessionFactory: <bean id="sqlSessionFa ...