docker自定义networking连接之间拒绝
我configuration了一个自定义的networking,我把3个容器放在里面:
- Nginx的反向代理,它发布80和443端口
- cadvisor
- gitlab
全部在my_dockernetworking中
在启动nginx的时候,从nginx容器里面得到connexion拒绝给别人的容器:
wget gitlab Connecting to gitlab (172.18.0.2:80) wget: can't connect to remote host (172.18.0.2): Connection refused wget cadvisor:8080ex Connecting to cadvisor:8080 (172.18.0.4:80) wget: can't connect to remote host (172.18.0.4): Connection refused
所以nginx不能服务于任何网站。
进入gitlab容器之后,执行:
root@gitlab:/# wget https://nginx --2017-05-12 08:19:20-- https://nginx/ Resolving nginx (nginx)... 172.18.0.3 Connecting to nginx (nginx)|172.18.0.3|:443... connected. ERROR: no certificate subject alternative name matches requested host name 'nginx11'. To connect to nginx insecurely, use `--no-check-certificate'.
所以gitlab可以连接到nginx,之后,nginx可以访问gitlab并将其反转,该网站工作正常。 但不是pipe理人员…所以我也是这样做的,从后来的nginx服务器上看pipe理员和pipe理员。
所以它的工作,但foreach重新启动我需要从其他容器wget nginx。
在我的docker日志中(Docker版本17.05.0-ce,build 89658be):
time="2017-05-12T10:18:33+02:00" level=warning msg="Running modprobe xt_conntrack failed with message: `libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/4.9.15-xxxx-std-ipv6-64/modules.dep.bin'`, error: exit status 1" time="2017-05-12T10:23:40.374738604+02:00" level=error msg="Error running exec in container: rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"bash\\\": executable file not found in $PATH\"\n"
docker检查my_docker
[ { "Name": "my_docker", "Id": "8b5b09704457ae6ddc7fd4a4f1b7374dd5a23c24c2a52978125ee8bafae7caf2", "Created": "0001-01-01T00:00:00Z", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "172.18.0.0/16", "Gateway": "172.18.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "Containers": { "1c9321fe039bb07455fc0e53fb845d517af87e0e8bba0749d09678e5d827656d": { "Name": "gitlab", "EndpointID": "5bc565b8b3bfd74cdbf1b1a7bfe839efffd60e2bc350d5a4eb2b9bb6fde984bd", "MacAddress": "02:42:ac:12:00:02", "IPv4Address": "172.18.0.2/16", "IPv6Address": "" }, "5feac5e7035137498599db36d22eac57d6a7a2f012ce656094d354565d178a74": { "Name": "nginx", "EndpointID": "6c60eee80506502433f58345721253fba93a3524b70b9cab8f411bef97af4997", "MacAddress": "02:42:ac:12:00:03", "IPv4Address": "172.18.0.3/16", "IPv6Address": "" }, "ac4939ccc1fe902df7c7821180cf7f5e1ec91e3be31697268c2a5b870efb9622": { "Name": "cadvisor", "EndpointID": "b9e69b40a0c982eb0e3aeb83eeccee141631e793e90bab526ba7b6741b3fe795", "MacAddress": "02:42:ac:12:00:04", "IPv4Address": "172.18.0.4/16", "IPv6Address": "" } }, "Options": {}, "Labels": {} } ]
- traefik反向代理与docker后端 – 在traefik的configuration文件configuration前端规则,而不是通过容器标签
- 使用nginx-proxy容器(如前端服务器)访问同一主机上的多个容器时出现错误503
- 在Docker上创buildNGINX逆向代理并向其他容器中的网站发送请求时出错
- 503服务暂时不可用gitlab docker和nginx-proxy docker
- nginx反向代理泊坞窗 – 按位置过滤
- Docker与nginx反向代理到golang服务器的问题
- Apacheconfigurationredirect到不同的主机和端口的stream量
- Docker-compose traefik PathPrefixStrip不能正常工作
- 防止redirect到https和URI hack nginx反向代理