Docker刚刚发行了EE版本和CE版本, 在这篇Memo之中将会纪录使用Easypack安装第一版DockerCE的方法.
项目 | 详细 |
---|---|
安装脚本 | https://github.com/liumiaocn/easypack/tree/master/docker |
OS | CentOS7 |
Linux 内核 | 3.10 |
sh easypack_docker.sh
之所以把yum install docker-ce的结果输出打开是因为目前的源下载还是有点慢,在此处可能会反复出错,网络好的话应该没有任何问题。
[root@liumiaocn ~]# sh easypack_docker.sh
Sun Mar 5 15:50:29 EST 2017
## Install Preconfirm
## Uname
3.10.0-327.el7.x86_64
## OS bit
64
Sun Mar 5 15:50:29 EST 2017
## Install begins : yum-utils
## Install ends : yum-utils
## Setting begins : yum-config-manager
## Setting ends : yum-config-manager
## Setting begins : Update package cache
## Setting ends : Update package cache
Sun Mar 5 15:50:37 EST 2017
## Install begins : docker-ce
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.btte.net
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:17.03.0.ce-1.el7.centos will be installed
--> Processing Dependency: docker-ce-selinux >= 17.03.0.ce-1.el7.centos for package: docker-ce-17.03.0.ce-1.el7.centos.x86_64
--> Processing Dependency: libcgroup for package: docker-ce-17.03.0.ce-1.el7.centos.x86_64
--> Processing Dependency: libseccomp.so.2()(64bit) for package: docker-ce-17.03.0.ce-1.el7.centos.x86_64
--> Processing Dependency: libltdl.so.7()(64bit) for package: docker-ce-17.03.0.ce-1.el7.centos.x86_64
--> Running transaction check
---> Package docker-ce-selinux.noarch 0:17.03.0.ce-1.el7.centos will be installed
--> Processing Dependency: selinux-policy-base >= 3.13.1-102 for package: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch
--> Processing Dependency: selinux-policy-targeted >= 3.13.1-102 for package: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch
--> Processing Dependency: policycoreutils-python for package: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch
---> Package libcgroup.x86_64 0:0.41-11.el7 will be installed
---> Package libseccomp.x86_64 0:2.3.1-2.el7 will be installed
---> Package libtool-ltdl.x86_64 0:2.4.2-21.el7_2 will be installed
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.5-11.el7_3 will be installed
--> Processing Dependency: policycoreutils = 2.5-11.el7_3 for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: setools-libs >= 3.3.8-1 for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-5 for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: libsepol.so.1(LIBSEPOL_1.0)(64bit) for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-11.el7_3.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-11.el7_3.x86_64
---> Package selinux-policy-targeted.noarch 0:3.13.1-60.el7 will be updated
---> Package selinux-policy-targeted.noarch 0:3.13.1-102.el7_3.15 will be an update
--> Processing Dependency: selinux-policy = 3.13.1-102.el7_3.15 for package: selinux-policy-targeted-3.13.1-102.el7_3.15.noarch
--> Processing Dependency: selinux-policy = 3.13.1-102.el7_3.15 for package: selinux-policy-targeted-3.13.1-102.el7_3.15.noarch
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.6.5-3.el7_3.1 will be installed
--> Processing Dependency: audit-libs(x86-64) = 2.6.5-3.el7_3.1 for package: audit-libs-python-2.6.5-3.el7_3.1.x86_64
---> Package checkpolicy.x86_64 0:2.5-4.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-5.1.el7_3 will be installed
--> Processing Dependency: libsemanage = 2.5-5.1.el7_3 for package: libsemanage-python-2.5-5.1.el7_3.x86_64
--> Processing Dependency: libsemanage.so.1(LIBSEMANAGE_1.1)(64bit) for package: libsemanage-python-2.5-5.1.el7_3.x86_64
---> Package libsepol.x86_64 0:2.1.9-3.el7 will be updated
---> Package libsepol.x86_64 0:2.5-6.el7 will be an update
---> Package policycoreutils.x86_64 0:2.2.5-20.el7 will be updated
---> Package policycoreutils.x86_64 0:2.5-11.el7_3 will be an update
--> Processing Dependency: libselinux-utils >= 2.5-6 for package: policycoreutils-2.5-11.el7_3.x86_64
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package selinux-policy.noarch 0:3.13.1-60.el7 will be updated
---> Package selinux-policy.noarch 0:3.13.1-102.el7_3.15 will be an update
---> Package setools-libs.x86_64 0:3.3.8-1.1.el7 will be installed
--> Processing Dependency: libselinux >= 2.5-0 for package: setools-libs-3.3.8-1.1.el7.x86_64
--> Running transaction check
---> Package audit-libs.x86_64 0:2.4.1-5.el7 will be updated
--> Processing Dependency: audit-libs = 2.4.1-5.el7 for package: audit-2.4.1-5.el7.x86_64
---> Package audit-libs.x86_64 0:2.6.5-3.el7_3.1 will be an update
---> Package libselinux.x86_64 0:2.2.2-6.el7 will be updated
--> Processing Dependency: libselinux = 2.2.2-6.el7 for package: libselinux-python-2.2.2-6.el7.x86_64
---> Package libselinux.x86_64 0:2.5-6.el7 will be an update
---> Package libselinux-utils.x86_64 0:2.2.2-6.el7 will be updated
---> Package libselinux-utils.x86_64 0:2.5-6.el7 will be an update
---> Package libsemanage.x86_64 0:2.1.10-18.el7 will be updated
---> Package libsemanage.x86_64 0:2.5-5.1.el7_3 will be an update
--> Running transaction check
---> Package audit.x86_64 0:2.4.1-5.el7 will be updated
---> Package audit.x86_64 0:2.6.5-3.el7_3.1 will be an update
---> Package libselinux-python.x86_64 0:2.2.2-6.el7 will be updated
---> Package libselinux-python.x86_64 0:2.5-6.el7 will be an update
--> Processing Conflict: libselinux-2.5-6.el7.x86_64 conflicts systemd < 219-20
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package systemd.x86_64 0:219-19.el7 will be updated
--> Processing Dependency: systemd = 219-19.el7 for package: systemd-sysv-219-19.el7.x86_64
---> Package systemd.x86_64 0:219-30.el7_3.7 will be an update
--> Processing Dependency: systemd-libs = 219-30.el7_3.7 for package: systemd-219-30.el7_3.7.x86_64
--> Running transaction check
---> Package systemd-libs.x86_64 0:219-19.el7 will be updated
--> Processing Dependency: systemd-libs = 219-19.el7 for package: libgudev1-219-19.el7.x86_64
---> Package systemd-libs.x86_64 0:219-30.el7_3.7 will be an update
---> Package systemd-sysv.x86_64 0:219-19.el7 will be updated
---> Package systemd-sysv.x86_64 0:219-30.el7_3.7 will be an update
--> Running transaction check
---> Package libgudev1.x86_64 0:219-19.el7 will be updated
---> Package libgudev1.x86_64 0:219-30.el7_3.7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================
Installing:
docker-ce x86_64 17.03.0.ce-1.el7.centos docker-ce-stable 19 M
Updating:
systemd x86_64 219-30.el7_3.7 updates 5.2 M
Installing for dependencies:
audit-libs-python x86_64 2.6.5-3.el7_3.1 updates 70 k
checkpolicy x86_64 2.5-4.el7 base 290 k
docker-ce-selinux noarch 17.03.0.ce-1.el7.centos docker-ce-stable 28 k
libcgroup x86_64 0.41-11.el7 base 65 k
libseccomp x86_64 2.3.1-2.el7 base 56 k
libsemanage-python x86_64 2.5-5.1.el7_3 updates 104 k
libtool-ltdl x86_64 2.4.2-21.el7_2 base 49 k
policycoreutils-python x86_64 2.5-11.el7_3 updates 445 k
python-IPy noarch 0.75-6.el7 base 32 k
setools-libs x86_64 3.3.8-1.1.el7 base 612 k
Updating for dependencies:
audit x86_64 2.6.5-3.el7_3.1 updates 233 k
audit-libs x86_64 2.6.5-3.el7_3.1 updates 85 k
libgudev1 x86_64 219-30.el7_3.7 updates 76 k
libselinux x86_64 2.5-6.el7 base 161 k
libselinux-python x86_64 2.5-6.el7 base 234 k
libselinux-utils x86_64 2.5-6.el7 base 151 k
libsemanage x86_64 2.5-5.1.el7_3 updates 144 k
libsepol x86_64 2.5-6.el7 base 288 k
policycoreutils x86_64 2.5-11.el7_3 updates 841 k
selinux-policy noarch 3.13.1-102.el7_3.15 updates 414 k
selinux-policy-targeted noarch 3.13.1-102.el7_3.15 updates 6.4 M
systemd-libs x86_64 219-30.el7_3.7 updates 369 k
systemd-sysv x86_64 219-30.el7_3.7 updates 63 k
Transaction Summary
===================================================================================================================================================
Install 1 Package (+10 Dependent packages)
Upgrade 1 Package (+13 Dependent packages)
Total size: 35 M
Total download size: 19 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm is not installed
docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm | 19 MB 00:00:52
Retrieving key from https://download.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:
Userid : "Docker Release (CE rpm) "
Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
From : https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libsepol-2.5-6.el7.x86_64 1/39
Updating : libselinux-2.5-6.el7.x86_64 2/39
Updating : audit-libs-2.6.5-3.el7_3.1.x86_64 3/39
Updating : libsemanage-2.5-5.1.el7_3.x86_64 4/39
Updating : systemd-libs-219-30.el7_3.7.x86_64 5/39
Updating : systemd-219-30.el7_3.7.x86_64 6/39
Installing : libcgroup-0.41-11.el7.x86_64 7/39
Updating : libselinux-utils-2.5-6.el7.x86_64 8/39
Updating : policycoreutils-2.5-11.el7_3.x86_64 9/39
Updating : selinux-policy-3.13.1-102.el7_3.15.noarch 10/39
Updating : selinux-policy-targeted-3.13.1-102.el7_3.15.noarch 11/39
Updating : systemd-sysv-219-30.el7_3.7.x86_64 12/39
Installing : libsemanage-python-2.5-5.1.el7_3.x86_64 13/39
Installing : audit-libs-python-2.6.5-3.el7_3.1.x86_64 14/39
Updating : libselinux-python-2.5-6.el7.x86_64 15/39
Installing : setools-libs-3.3.8-1.1.el7.x86_64 16/39
Installing : checkpolicy-2.5-4.el7.x86_64 17/39
Installing : libtool-ltdl-2.4.2-21.el7_2.x86_64 18/39
Installing : python-IPy-0.75-6.el7.noarch 19/39
Installing : policycoreutils-python-2.5-11.el7_3.x86_64 20/39
Installing : docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch 21/39
libsemanage.semanage_direct_install_info: Overriding docker module at lower priority 100 with module at priority 400.
restorecon: lstat(/var/lib/docker) failed: No such file or directory
warning: %post(docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch) scriptlet failed, exit status 255
Non-fatal POSTIN scriptlet failure in rpm package docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch
Installing : libseccomp-2.3.1-2.el7.x86_64 22/39
Installing : docker-ce-17.03.0.ce-1.el7.centos.x86_64 23/39
Updating : audit-2.6.5-3.el7_3.1.x86_64 24/39
Updating : libgudev1-219-30.el7_3.7.x86_64 25/39
Cleanup : audit-2.4.1-5.el7.x86_64 26/39
Cleanup : selinux-policy-targeted-3.13.1-60.el7.noarch 27/39
Cleanup : selinux-policy-3.13.1-60.el7.noarch 28/39
Cleanup : systemd-sysv-219-19.el7.x86_64 29/39
Cleanup : policycoreutils-2.2.5-20.el7.x86_64 30/39
Cleanup : libsemanage-2.1.10-18.el7.x86_64 31/39
Cleanup : systemd-219-19.el7.x86_64 32/39
Cleanup : libselinux-utils-2.2.2-6.el7.x86_64 33/39
Cleanup : libgudev1-219-19.el7.x86_64 34/39
Cleanup : systemd-libs-219-19.el7.x86_64 35/39
Cleanup : libselinux-python-2.2.2-6.el7.x86_64 36/39
Cleanup : libselinux-2.2.2-6.el7.x86_64 37/39
Cleanup : libsepol-2.1.9-3.el7.x86_64 38/39
Cleanup : audit-libs-2.4.1-5.el7.x86_64 39/39
Verifying : libseccomp-2.3.1-2.el7.x86_64 1/39
Verifying : libsepol-2.5-6.el7.x86_64 2/39
Verifying : systemd-219-30.el7_3.7.x86_64 3/39
Verifying : libselinux-python-2.5-6.el7.x86_64 4/39
Verifying : systemd-sysv-219-30.el7_3.7.x86_64 5/39
Verifying : policycoreutils-python-2.5-11.el7_3.x86_64 6/39
Verifying : libgudev1-219-30.el7_3.7.x86_64 7/39
Verifying : libselinux-utils-2.5-6.el7.x86_64 8/39
Verifying : audit-2.6.5-3.el7_3.1.x86_64 9/39
Verifying : selinux-policy-targeted-3.13.1-102.el7_3.15.noarch 10/39
Verifying : policycoreutils-2.5-11.el7_3.x86_64 11/39
Verifying : python-IPy-0.75-6.el7.noarch 12/39
Verifying : docker-ce-17.03.0.ce-1.el7.centos.x86_64 13/39
Verifying : libcgroup-0.41-11.el7.x86_64 14/39
Verifying : selinux-policy-3.13.1-102.el7_3.15.noarch 15/39
Verifying : audit-libs-2.6.5-3.el7_3.1.x86_64 16/39
Verifying : libtool-ltdl-2.4.2-21.el7_2.x86_64 17/39
Verifying : libsemanage-2.5-5.1.el7_3.x86_64 18/39
Verifying : systemd-libs-219-30.el7_3.7.x86_64 19/39
Verifying : libselinux-2.5-6.el7.x86_64 20/39
Verifying : audit-libs-python-2.6.5-3.el7_3.1.x86_64 21/39
Verifying : libsemanage-python-2.5-5.1.el7_3.x86_64 22/39
Verifying : docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch 23/39
Verifying : setools-libs-3.3.8-1.1.el7.x86_64 24/39
Verifying : checkpolicy-2.5-4.el7.x86_64 25/39
Verifying : selinux-policy-targeted-3.13.1-60.el7.noarch 26/39
Verifying : systemd-sysv-219-19.el7.x86_64 27/39
Verifying : libgudev1-219-19.el7.x86_64 28/39
Verifying : systemd-219-19.el7.x86_64 29/39
Verifying : selinux-policy-3.13.1-60.el7.noarch 30/39
Verifying : systemd-libs-219-19.el7.x86_64 31/39
Verifying : libselinux-utils-2.2.2-6.el7.x86_64 32/39
Verifying : libsepol-2.1.9-3.el7.x86_64 33/39
Verifying : libsemanage-2.1.10-18.el7.x86_64 34/39
Verifying : audit-libs-2.4.1-5.el7.x86_64 35/39
Verifying : libselinux-python-2.2.2-6.el7.x86_64 36/39
Verifying : policycoreutils-2.2.5-20.el7.x86_64 37/39
Verifying : audit-2.4.1-5.el7.x86_64 38/39
Verifying : libselinux-2.2.2-6.el7.x86_64 39/39
Installed:
docker-ce.x86_64 0:17.03.0.ce-1.el7.centos
Dependency Installed:
audit-libs-python.x86_64 0:2.6.5-3.el7_3.1 checkpolicy.x86_64 0:2.5-4.el7 docker-ce-selinux.noarch 0:17.03.0.ce-1.el7.centos
libcgroup.x86_64 0:0.41-11.el7 libseccomp.x86_64 0:2.3.1-2.el7 libsemanage-python.x86_64 0:2.5-5.1.el7_3
libtool-ltdl.x86_64 0:2.4.2-21.el7_2 policycoreutils-python.x86_64 0:2.5-11.el7_3 python-IPy.noarch 0:0.75-6.el7
setools-libs.x86_64 0:3.3.8-1.1.el7
Updated:
systemd.x86_64 0:219-30.el7_3.7
Dependency Updated:
audit.x86_64 0:2.6.5-3.el7_3.1 audit-libs.x86_64 0:2.6.5-3.el7_3.1 libgudev1.x86_64 0:219-30.el7_3.7
libselinux.x86_64 0:2.5-6.el7 libselinux-python.x86_64 0:2.5-6.el7 libselinux-utils.x86_64 0:2.5-6.el7
libsemanage.x86_64 0:2.5-5.1.el7_3 libsepol.x86_64 0:2.5-6.el7 policycoreutils.x86_64 0:2.5-11.el7_3
selinux-policy.noarch 0:3.13.1-102.el7_3.15 selinux-policy-targeted.noarch 0:3.13.1-102.el7_3.15 systemd-libs.x86_64 0:219-30.el7_3.7
systemd-sysv.x86_64 0:219-30.el7_3.7
Complete!
## Install ends : docker-ce
Sun Mar 5 15:52:37 EST 2017
## Setting begins : stop firewall
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
## Setting ends : stop firewall
## Setting begins : clear iptable rules
## Setting ends : clear iptable rules
## Setting begins : systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
## Setting ends : systemctl enable docker
## Setting begins : systemctl start docker
## Setting ends : systemctl start docker
## docker version
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.03.0-ce
Storage Driver: overlay
Backing Filesystem: xfs
Supports d_type: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 977c511eda0925a723debdc94d09459af49d082a
runc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-327.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.939 GiB
Name: liumiaocn
ID: VTII:XPFB:2UTP:2722:MF66:X5QE:V3ZV:33DV:MUBI:IFV5:IOWE:BVYS
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
[root@liumiaocn ~]#
可以看到版本已经是17.03.0-ce了。
[root@liumiaocn ~]# docker version
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 08:10:07 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 08:10:07 2017
OS/Arch: linux/amd64
Experimental: false
[root@liumiaocn ~]#