Docker: Troubleshooting

 20th August 2020 at 2:19pm

Docker run 报建 endpoint 失败

如:

docker run --rm hello-world
docker: Error response from daemon: failed to create endpoint jolly_kare on network bridge: failed to add the host (veth1d85371) <=> sandbox (vethbc264f6) pair interfaces: operation not supported.

这大概率是因为你升级了 kernel 但是没重启。参考 这里

做了端口映射将容器内端口映射到宿主机上,但是访问失败

如下面 8080 (container) => 10000 (host),但是访问宿主机 10000 端口时报 connection reset:

docker run -d -ti -p 10000:8080 onlyice/public-wiki

原因是容器内的应用程序监听在 localhost 上,导致无法对外服务。