因為阿里雲的CentOS 6.5版本預設核心kernel版本是2.6的,比較低。安裝docker的後,運行不了。
步驟:
1、使用命令更新:
yum update
2、安裝Docker。這裡忽略500字。。。。
3、使用命令查看IP:
ifconfig
將看到有類似的結果:
eth0 Link encap:Ethernet HWaddr 00:16:3E:00:6B:5D inet addr:10.169.127.193 Bcast:10.169.127.255 Mask:255.255.248.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:103408201 errors:0 dropped:0 overruns:0 frame:0 TX packets:426317 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4734752352 (4.4 GiB) TX bytes:38914346 (37.1 MiB) Interrupt:164
4、使用命令運行Docker:
docker -bip=10.169.127.193/24 -d
5、運行完後,可以再使用命令 ifconfig看IP配置:
docker0 Link encap:Ethernet HWaddr 86:AF:F8:0A:6F:FF inet addr:10.169.127.193 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
這裡多了一個docker0的橋接網卡。
完結。
感謝閱讀,希望能協助到大家,謝謝大家對本站的支援!