title: Access GitLab running in a docker container
body: <p>I'm trying to set up <strong>GitLab as a docker container</strong> in an internal server. Let's assume the server's IP is <code>10.10.10.10</code>. Below is my docker-compose file that I use to bring up the container. I'm unable to access the http url via <code>localhost:4080</code> (from a browser within the server) OR via the IP <code>10.10.10.10:4080</code>. I'd like to understand what I'm missing here. </p>
  
  <pre><code>version: '2'
  
  services:
  
    gitlab:
      image: gitlab-ee-img:12.0.9-ee.0
      container_name: gitlab
      restart: always
      hostname: 'localhost:4080'
      # environment:
      #   GITLAB_OMNIBUS_CONFIG: |
      #     # Add any other gitlab.rb configuration here, each on its own line
      #     # external_url 'https://gitlab.example.com'
      #     external_url 'http://127.0.0.1:4080'
      ports:
        - '4080:80'
        - '4443:443'
        - '4022:22'
      volumes:
        - '/data/gitlab/config:/etc/gitlab'
        - '/data/gitlab/logs:/var/log/gitlab'
        - '/data/gitlab/data:/var/opt/gitlab'
  </code></pre>