Docker 容器没有第二次启动(iptables)
Docker container not starting a second time (iptables)
使用本指南 http://docs.graylog.org/en/1.1/pages/installation/docker.html 我在我的 Ubuntu 14.04 服务器上设置了一个 Docker 容器。
第一次使用命令启动容器时如预期的那样。
docker run -t -p 9000:9000 -p 12201:12201 graylog2/allinone
我能够打开暴露在端口 9000 上的 Web 界面。
当我停止 Container 并尝试使用相同的命令再次 运行 它时,我收到此错误:
Error response from daemon: Cannot start container c5cc5831fe854801345ffa2370fdb4f00f4182e209fe1af78233c93be3952bb1:
iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 12201 -j
DNAT --to-destination 172.17.0.9:12201 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)
在没有任何 -p 参数的情况下启动容器会导致 运行ning 容器。但是端口似乎没有暴露。我无法访问网络界面。
"docker ps" 的输出看起来像这样:
84d322d35d58 graylog2/allinone "/opt/graylog/embedd 9 minutes ago Up 9 minutes
443/tcp, 514/tcp, 4001/tcp, 9000/tcp, 514/udp,
12201/tcp, 12900/tcp, 12201/udp focused_elion
对我来说,端口似乎暴露了。但是主机没有将请求转发到 Docker 容器。
删除容器并重新安装后 Docker,然后再次安装容器,它在第一次启动时再次运行。但是第二次失败了。
欢迎任何提示或指点!
希望 docs.docker.com 中的以下段落对我有帮助 you.Worked ...
Oops! Just after you stopped the container you get a call to say
another developer needs the container back. From here you have two
choices: you can create a new container or restart the old one. Let’s
look at starting our previous container back up.
$ docker start nostalgic_morse
nostalgic_morse
Now quickly run docker ps -l
again to see the running container is
back up or browse to the container’s URL to see if the application
responds.
Note: Also available is the docker restart command that runs a stop
and then start on the container.
使用本指南 http://docs.graylog.org/en/1.1/pages/installation/docker.html 我在我的 Ubuntu 14.04 服务器上设置了一个 Docker 容器。
第一次使用命令启动容器时如预期的那样。
docker run -t -p 9000:9000 -p 12201:12201 graylog2/allinone
我能够打开暴露在端口 9000 上的 Web 界面。
当我停止 Container 并尝试使用相同的命令再次 运行 它时,我收到此错误:
Error response from daemon: Cannot start container c5cc5831fe854801345ffa2370fdb4f00f4182e209fe1af78233c93be3952bb1:
iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 12201 -j
DNAT --to-destination 172.17.0.9:12201 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)
在没有任何 -p 参数的情况下启动容器会导致 运行ning 容器。但是端口似乎没有暴露。我无法访问网络界面。 "docker ps" 的输出看起来像这样:
84d322d35d58 graylog2/allinone "/opt/graylog/embedd 9 minutes ago Up 9 minutes
443/tcp, 514/tcp, 4001/tcp, 9000/tcp, 514/udp,
12201/tcp, 12900/tcp, 12201/udp focused_elion
对我来说,端口似乎暴露了。但是主机没有将请求转发到 Docker 容器。
删除容器并重新安装后 Docker,然后再次安装容器,它在第一次启动时再次运行。但是第二次失败了。
欢迎任何提示或指点!
希望 docs.docker.com 中的以下段落对我有帮助 you.Worked ...
Oops! Just after you stopped the container you get a call to say another developer needs the container back. From here you have two choices: you can create a new container or restart the old one. Let’s look at starting our previous container back up.
$ docker start nostalgic_morse nostalgic_morse
Now quickly run
docker ps -l
again to see the running container is back up or browse to the container’s URL to see if the application responds.Note: Also available is the docker restart command that runs a stop and then start on the container.