Installed via docker compose and docker.example.com is not reachable

Summary

I spun up a new instance of GitLab using docker compose as per: https://docs.gitlab.com/ee/install/docker.html#install-gitlab-using-docker-compose and http://docker.example.com is not reachable. I did not change anything in the example .yml except for the local volume paths (as my host system is Windows 10) and these are working correctly.

http://127.0.0.1 and http://localhost are accessible, but many links within the GitLab instance are broken as they reference docker.example.com

Whilst the hostname of the Docker container was correctly set, the external_url property in /etc/gitlab/gitlab.rb was not unhashed. I tried editing this and reconfiguring as per https://docs.gitlab.com/omnibus/settings/configuration.html#configure-the-external-url-for-gitlab but to no avail. I tried a restart of the Docker engine later, again no luck.

I could of course edit my system hosts file to point http://docker.example.com to 127.0.0.1 but I believe in the past, this worked "out of the box" (though I'm unsure how).

Steps to reproduce

Presumably, following the documented instructions as I did?

What is the current bug behavior?

This site can’t be reached. Check if there is a typo in gitlab.example.com.

What is the expected correct behavior?

The Gitlab instance is displayed.

Relevant logs

Relevant logs

Details of package version

Provide the package version installation details
# dpkg-query -l "gitlab-*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-============================================================
un  gitlab-ce                    (no description available)
ii  gitlab-ee      14.10.2-ee.0 amd64        GitLab Enterprise Edition (including NGINX, Postgres, Redis)

Environment details

  • Operating System: Windows 10 21H2 19044.1706
  • Installation Target, remove incorrect values:
    • Other: Docker Engine v20.10.14
  • Installation Type: New Installation
  • Is there any other software running on the machine: Nothing using port 80/443
  • Is this a single or multiple node installation? Single
  • Resources
    • CPU: Intel Core i7-4790
    • Memory total: 32GB

Configuration details

Provide the relevant sections of `/etc/gitlab/gitlab.rb`
external_url 'http://gitlab.example.com'
Edited May 17, 2022 by Robin Malik
Assignee Loading
Time tracking Loading