CentOS7 installation Docker solve problems that cannot be started _docker

Source: Internet
Author: User
Tags gpg

CentOS7 installation Docker not start, in the work encountered this problem, at that time not clear, online information is not much, but after their own tinkering finally solved

This problem!

 [root@test ~]# yum Update [root@test ~]# yum install docker] [root@test ~]# service Docker s  Tart redirecting to/bin/systemctl start Docker.service Job for Docker.service failed because the control process exited With error code.

"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 four 2016-03-10 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_jo Urnal_ini the ... 

March 13:01:20 test.mayocase.com systemd[1]: Failed to start Docker applic ....

March 13:01:20 test.mayocase.com systemd[1]: unit Docker.service entered F ....

March 13:01:20 test.mayocase.com systemd[1]: Docker.service failed.

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

Hint:some lines were ellipsized, use-l.

[Root@test ~]#

Use Yum install Docker can not start after installation

[Root@apptest ~]# Service Docker start
redirecting To/bin/systemctl start Docker.service

Always stay in the above steps

You can do this by using the following command to successfully install.

A problem let me toss for two days, tried to shut down the firewall, shut down the SELinux, reload the system, and so on the Internet can find ways to solve.

If you solve the problem, please thank me for your reply.

[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
gpgkey=https://yum.dockerproject.org/gpg
 
[ Root@test yum.repos.d]# Yum Install Docker-engine
 

Already installed:

docker-engine.x86_64 0:1.10.2-1.el7.centos

be installed as dependencies:

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 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]# 

Or use the following methods

[root@apptest ~]# Curl-fssl https://get.docker.com/| SH + sh-c ' sleep 3; Yum-y-Q Install docker-engine ' Warning:/var/cache/yum/x86_64/7/docker-main-repo/packages/
DOCKER-ENGINE-SELINUX-1.10.2-1.EL7.CENTOS.NOARCH.RPM: Header V4 rsa/sha512 Signature, key ID 2c52609d:nokey DOCKER-ENGINE-SELINUX-1.10.2-1.EL7.CENTOS.NOARCH.RPM Public key has not been installed import GPG key 0x2c52609d: User id: "Docker release Tool (Releas Edocker) <docker@docker.com> "fingerprint: 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d from: Https://yum.docker
PROJECT.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: Mon Feb 16:16:33 2016 OS/ARCH:LINUX/AMD64 cannot connect to the Docker.
 
Is the Docker daemon running to this host? If you are docker as a non-root user, you are should now consider adding your user to the ' Docker ' group with so Mething Like:sudo usermod-ag Docker your-user Remember thAt your would have to log out and then in the to take effect! [Root@apptest ~]# [root@apptest ~]# service Docker start redirecting To/bin/systemctl start Docker.service [root@appte 
 St ~]# Docker images REPOSITORY TAG IMAGE ID CREATED SIZE [Root@apptest ~]#

  Thank you for reading, I hope to help you, thank you for your support for this site!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.