关于docker的一些问题

来源:互联网 发布:淘宝店代理货源 编辑:程序博客网 时间:2024/06/03 06:01
$ sudo docker -d
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
INFO[0000] [graphdriver] using prior storage driver "devicemapper" 
FATA[0000] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: Failed to Setup IP tables: Unable to enable NAT rule: iptables failed: iptables --wait -t nat -I POSTROUTING -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE: iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

 (exit status 3) 


解决方法

http://stackoverflow.com/questions/28230495/i-cant-start-the-docker-service-with-iptables-error


# make menuconfig

--> Networking support

--> Networking options

--> Network packet filtering framework


open those NAT, NF_NAT related options


recompile, reboot the new kernel

# make all

# make modules_install

# make install

after that, # lsmod | grep nat , if those modules shows, it should work.

enter image description here



0 0
原创粉丝点击