centos安装docker
[root@localhost ~]# yum install https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.skyshe.cn
* updates: centosx4.centos.org
Setting up Install Process
docker-engine-1.7.1-1.el6.x86_64.rpm | 4.5 MB 00:07
Examining /var/tmp/yum-root-YSfgzS/docker-engine-1.7.1-1.el6.x86_64.rpm: docker-engine-1.7.1-1.el6.x86_64
Marking /var/tmp/yum-root-YSfgzS/docker-engine-1.7.1-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:1.7.1-1.el6 will be installed
--> Processing Dependency: libcgroup for package: docker-engine-1.7.1-1.el6.x86_64
--> Running transaction check
---> Package libcgroup.x86_64 0:0.40.rc1-16.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================
Installing:
docker-engine x86_64 1.7.1-1.el6 /docker-engine-1.7.1-1.el6.x86_64 19 M
Installing for dependencies:
libcgroup x86_64 0.40.rc1-16.el6 base 129 k
Transaction Summary
============================================================================================================================================================
Install 2 Package(s)
Total size: 19 M
Total download size: 129 k
Installed size: 20 M
Is this ok [y/N]: y
Downloading Packages:
libcgroup-0.40.rc1-16.el6.x86_64.rpm | 129 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libcgroup-0.40.rc1-16.el6.x86_64 1/2
Installing : docker-engine-1.7.1-1.el6.x86_64 2/2
Verifying : libcgroup-0.40.rc1-16.el6.x86_64 1/2
Verifying : docker-engine-1.7.1-1.el6.x86_64 2/2
Installed:
docker-engine.x86_64 0:1.7.1-1.el6
Dependency Installed:
libcgroup.x86_64 0:0.40.rc1-16.el6
Complete!
[root@localhost ~]# service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
安装docker-compose
$curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$chmod +x /usr/local/bin/docker-compose