Docker container cannot resolve request to service in another container

I’m running gitlab-ce and gitlab-ci-multi-runner in separated docker containers, but on the same server.

Gitlab CE works fine, I can access it via browser and clone projects using both http and ssh.

  • Docker, Registrator and Consul by example
  • Cannot setup multi-host Docker overlay network with etcd
  • php-fpm & nginx in separated docker container, can not execute .php file
  • How to map ports with - Express + Docker + Azure
  • Set the docker daemon environment variables on Centos?
  • 404 while serving static files via docker nginx
  • However my runner cannot connect to Gitlab using domain/server ip. It can connect to it only via local docker network (for example using ip address 172.17.0.X or, if linked, by using service alias).

    Ping to domain/server ip returns response.

    I tried to link it as but it didn’t work, as somehow runner resolved server ip address instead of local network address

     Checking for builds... failed: couldn't execute POST against Post dial tcp server.ip:80: i/o timeout



      image: gitlab/gitlab-ce:8.2.2-ce.0
      privileged: true
        - ./gitlab-config:/etc/gitlab
        - ./gitlab-data:/var/opt/gitlab
        - ./gitlab-logs:/var/log/gitlab
      restart: always
        - server.ip:22:22
        - server.ip:80:80
        - server.ip:443:443
      image: gitlab/gitlab-runner:alpine
      restart: always
       - ./runner-config:/etc/gitlab-runner
       - /var/run/docker.sock:/var/run/docker.sock

    I have no clue what’s the issue here.
    I’d appreciate your help.
    Thanks in advance! 🙂

  • Bunyan logger on aws leaks file descriptors
  • java -jar lib/kvstore.jar ping - ConnectException when using IPAddress
  • How to join ElasticSearch cluster with nodes in docker instance
  • Issues with docker build command and github
  • Run Ruby script on Docker
  • Configure Tiller with Docker
  • One Solution collect form web for “Docker container cannot resolve request to service in another container”

    Seems like it was a firewall problem. Unlocking docker0 interface allowed traffic from containers 🙂

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.