因为阿里云的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的桥接网卡。

 

就这样。

相关文章:

  • 2021-11-08
  • 2022-12-23
  • 2021-11-18
  • 2021-05-26
  • 2021-06-02
  • 2022-12-23
  • 2021-10-16
  • 2021-10-13
猜你喜欢
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2021-09-16
  • 2021-08-30
  • 2022-12-23
  • 2021-09-12
相关资源
相似解决方案