Docker nginx-proxy:不能从jenkins的域名中访问gitlab

我目前正在为我的公司开发一个工具链,在那里我使用Docker来设置Gitlab和Jenkins。

我使用jwilder / nginx-proxy从外部访问域名。

我的问题是,当我尝试configurationjenkins有权访问我的Gitlab,我得到一个超时错误。 似乎容器之间不能通过使用域名进行交互。

我发现这个问题与我有同样的问题,不幸的是,他的解决scheme没有解决我的问题。

你有什么想法,我怎么可以使jenkins通过使用域名获得访问Gitlab?

编辑:

这是我的docker-compose文件

version: '3' services: nginx: container_name: nginx restart: always image: jwilder/nginx-proxy:latest ports: - 80:80 - 443:443 volumes: - conf:/etc/nginx/conf.d - vhost:/etc/nginx/vhost.d - html:/usr/share/nginx/html - /home/nginx/certs:/etc/nginx/certs:ro - /var/run/docker.sock:/tmp/docker.sock labels: - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true" letsencrypt: container_name: letsencrypt restart: always image: jrcs/letsencrypt-nginx-proxy-companion:latest depends_on: - nginx volumes: - conf:/etc/nginx/conf.d - vhost:/etc/nginx/vhost.d - html:/usr/share/nginx/html - /home/nginx/certs:/etc/nginx/certs:rw - /var/run/docker.sock:/var/run/docker.sock:ro environment: - NGINX_DOCKER_GEN_CONTAINER=nginx gitlab: container_name: gitlab restart: always image: gitlab/gitlab-ce:latest hostname: gitlab volumes: - /home/gitlab/config:/etc/gitlab - /home/gitlab/logs:/var/logs/gitlab - /home/gitlab/data:/var/opt/gitlab environment: - VIRTUAL_HOST=gitlab.domain.biz #- VIRTUAL_PORT=443 #- VIRTUAL_PROTO=https - LETSENCRYPT_HOST=gitlab.domain.biz - LETSENCRYPT_EMAIL=dev@domain.com jenkins: container_name: jenkins restart: always image: jenkins:alpine volumes: - /home/jenkins/jenkins_home:/var/jenkins_home:z environment: - VIRTUAL_HOST=jenkins.domain.biz - VIRTUAL_PORT=8080 - LETSENCRYPT_HOST=jenkins.domain.biz - LETSENCRYPT_EMAIL=dev@domain.com volumes: conf: vhost: html: networks: default: external: name: toolchain 

编辑2:

Message d'erreur du nginx-proxy:

 nginx | nginx.1 | 2017/07/12 12:45:33 [error] 79#79: *356 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: jenkins.domai1n.biz, request: "GET /descriptorByName/github-plugin-configuration/checkHookUrl?value=https%3A%2F%2Fjenkins.domain.biz%2Fgithub-webhook%2F HTTP/2.0", upstream: "http://172.18.0.7:8080/descriptorByName/github-plugin-configuration/checkHookUrl?value=https%3A%2F%2Fjenkins.domain.biz%2Fgithub-webhook%2F", host: "jenkins.domain.biz", referrer: "https://jenkins.domain.biz/configure" 

jenkins的消息: 杰金斯错误的形象