Install Docker1.8 in Centos7
1. Create a docker yum Library
[Root @ localhost ~] # Cd/etc/yum. repos. d/
[Root@localhostyum.repos.d] # vim docker. repo
[Dockerrepo]
Name = DockerRepository
Base url = https://yum.dockerproject.org/repo/main/centos/7
Enabled = 1
Gpgcheck = 1
Gpgkey = https://yum.dockerproject.org/gpg
(2) install docker
[Root @ localhost ~] # Yum install docker-engine
(3) disable the firewalld service under centos7 and install iptables-ser
[Root @ localhost ~] # Systemctl disable firewalld
Rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
Rm '/etc/systemd/system/basic.tar get. wants/firewalld. Service'
[Root @ localhost ~] # Yum-y install iptables-services
(4) Enable the iptables service
[Root @ localhost ~] # Systemctl enable iptables
Ln-s '/usr/lib/systemd/system/iptables. service'/etc/systemd/system/basic.tar get. wants/iptables. Service'
[Root @ localhost ~] # Systemctl start iptables
(5) Start the docker service and set automatic start upon startup
[Root @ localhost ~] # Systemctl start docker. service
[Root @ localhost ~] # Systemctl enable docker. service
Ln-s '/usr/lib/systemd/system/docker. service'/etc/systemd/system/multi-user.target.wants/docker. Service'
(6) Verify that docker is successfully installed
[Root @ localhost ~] # Docker info
Containers: 0
Images: 0
StorageDriver: devicemapper
Pool Name: docker-253: 1-50332704-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: xfs
Data file:/dev/loop0
Metadata file:/dev/loop1
Data Space Used: 1.821 GB
Data Space Total: 107.4 GB
Data Space Available: 7.413 GB
Metadata Space Used: 1.479 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.146 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Data loop file:/var/lib/docker/devicemapper/data
Metadata loop file:/var/lib/docker/devicemapper/metadata
Library Version: 1.02.93-RHEL7)
ExecutionDriver: native-0.2
LoggingDriver: json-file
KernelVersion: 3.10.0-229.7.2.el7.x86 _ 64
OperatingSystem: CentOS Linux 7 (Core)
CPUs: 1
TotalMemory: 1.791 GiB
Name: localhost. localdomain
ID: 2EEQ: 3VMI: TIUY: NUHZ: NZMQ: VOD7: YW3K: KZG3: IQZT: XR4Q: G4XJ: TCVM
(8) view the installed docker version
[Root @ localhost ~] # Docker version
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:08:45 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:08:45 UTC 2015
OS/Arch: linux/amd64