2019独角兽企业重金招聘Python工程师标准>>>
参考文档:http://docs.docker.com/installation/centos/
安装epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
安装docker服务端
yum install docker-io
启动docker
/etc/init.d/docker start
开机自启
chkconfig docker on
下载centos image
[root@test-server ~]# docker pull centos:latest
Pulling repository centos
0c752394b855: Download complete
511136ea3c5a: Download complete
34e94e67e63a: Download complete
运行一个docker程序
docker run -i -t centos:latest /bin/bash
[root@test-server ~]# docker run -i -t centos:latest /bin/bash
bash-4.1# ifconfig
eth0 Link encap:Ethernet HWaddr 72:49:A4:9C:E3:99 inet addr:172.17.0.3 Bcast:0.0.0.0 Mask:255.255.0.0inet6 addr: fe80::7049:a4ff:fe9c:e399/64 Scope:LinkUP BROADCAST RUNNING MTU:1500 Metric:1RX packets:5 errors:0 dropped:0 overruns:0 frame:0TX packets:3 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000 RX bytes:440 (440.0 b) TX bytes:300 (300.0 b)
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0inet6 addr: ::1/128 Scope:HostUP LOOPBACK RUNNING MTU:1500 Metric:1RX packets:0 errors:0 dropped:0 overruns:0 frame:0TX packets:0 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
docker安装到此结束