安装docker1.10
1.安装
关闭 /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
装 yum -y install docker centos7
装 yum -y install docker-engine centos6
2.启动
为啥安装完启动失败 yum -y install docker
[root@CentOS7 ~]# 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.
A:yum remove docker
yum remove docker-selinux
vi /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
yum install docker-engine
[root@CentOS7 yum.repos.d]# service docker start
Redirecting to /bin/systemctl start docker.service
[root@CentOS7 yum.repos.d]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@CentOS7 yum.repos.d]# docker version
Client:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:39:25 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:39:25 2016
OS/Arch: linux/amd64
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:39:25 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:39:25 2016
OS/Arch: linux/amd64
3.卸载
[root@CentOS7 yum.repos.d]# yum list installed | grep docker
docker-engine.x86_64 1.10.3-1.el7.centos @dockerrepo
docker-engine-selinux.noarch 1.10.3-1.el7.centos @dockerrepo
[root@CentOS7 yum.repos.d]# yum -y remove docker-engine.x86_64
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:1.10.3-1.el7.centos will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================
Package Arch Version Repository Size
================================================================================================
Removing:
docker-engine x86_64 1.10.3-1.el7.centos @dockerrepo 41 M
Transaction Summary
================================================================================================
Remove 1 Package
Installed size: 41 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : docker-engine-1.10.3-1.el7.centos.x86_64 1/1
Verifying : docker-engine-1.10.3-1.el7.centos.x86_64 1/1
Removed:
docker-engine.x86_64 0:1.10.3-1.el7.centos
Complete!
[root@CentOS7 yum.repos.d]# yum -y remove docker-engine-selinux.noarch
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package docker-engine-selinux.noarch 0:1.10.3-1.el7.centos will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================
Package Arch Version Repository Size
================================================================================================
Removing:
docker-engine-selinux noarch 1.10.3-1.el7.centos @dockerrepo 43 k
Transaction Summary
================================================================================================
Remove 1 Package
Installed size: 43 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : docker-engine-selinux-1.10.3-1.el7.centos.noarch 1/1
Verifying : docker-engine-selinux-1.10.3-1.el7.centos.noarch 1/1
Removed:
docker-engine-selinux.noarch 0:1.10.3-1.el7.centos
Complete!