docker开启容器服务的时候报iptables错误

在启动我本地虚拟机上的nginx时,报了一个如下的错误

[root@localhost jdk]# docker run --name=hbk_nginx_test -p 8090:80 -d nginx
ce42266cdf858f37d391588c7af58154abd2ecc0d378467fa26d04c964101509
docker: Error response from daemon: driver failed programming external connectivity on endpoint hbk_nginx_test (e864466a4d9faac79c02e6eca4f08f453bf09431a475b1b3c6742ee0f844a75c):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8090 -j DNAT --to-destination 172.17.0.3:80 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1)).

网上找了好多资料,发现重启docker服务,重新开启nginx即可。

service docker restart

你可能感兴趣的:(docker)