[dev@OG2233-FM41-226 tmp]$ sudo yum -y install docker-io
这个应该是centos6的安装,如果安装不了试一下安装epel源,如下:
sudo yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[dev@OG2233-FM41-226 tmp]$ vi /etc/sysconfig/docker
开始服务
[dev@OG2233-FM41-226 tmp]$ sudo service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
自动运行
[dev@OG2233-FM41-226 tmp]$ sudo chkconfig docker on
查看版本
[dev@OG2233-FM41-226 tmp]$ sudo docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d/1.7.1
OS/Arch (server): linux/amd64
查看信息
[dev@OG2233-FM41-226 tmp]$ sudo docker info
Containers: 0
Images: 0
Storage Driver: devicemapper
Pool Name: docker-8:2-805055-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 305.7 MB
Data Space Total: 107.4 GB
Data Space Available: 14.97 GB
Metadata Space Used: 729.1 kB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.147 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.117-RHEL6 (2016-08-15)
Execution Driver: lxc-1.0.8
Logging Driver: json-file
Kernel Version: 2.6.32-642.6.2.el6.x86_64
Operating System: <unknown>
CPUs: 1
Total Memory: 1.826 GiB
Name: OG2233-FM41-226
ID: H6SZ:HQIY:6I4R:JC25:5DWF:B5XY:V5O6:OJ5R:L3PJ:ZGIW:CELV:BCHJ
详细参考如下:
http://www.server110.com/docker/201411/11105.html