I got the same problem, but here’s what i did and now it’s working:
changed /srv/gitlab/config/gitlab.rb:
external_url "http://gitlab.example.com:8929" # set the address of gitlab
nginx['listen_port'] = 8929 # make nginx to listen on the sam port as confgured in external_url
docker run --detach \
--hostname gitlab.example.com \
--publish 8929:8929 \ # map the port which is usted by nginx to the same port i would like to use finally
--publish 2289:22 \
--name gitlab-test \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest
i’ve found this was corrected in the documentation, but another issue roll back to the wrong doc !
i wrote in the issues at gitlab documentation … waiting
The post is a little bit older but i struggled over some related problems.
You configured this:
--publish 8929:80 \
--publish 2289:22 \
What you are doing here is, you map the hosts port 8929 to the container port 80. Same with host:2289 to container:22.
But than you have changed GitLab’s ports in the container. That way the traffic on host:8929 is forwarded to port 80 in the container which is not used anymore.
You have to options.
Configure the ports in GitLab uses in the container and expose them to the host
Leave GitLab’s configuration as default and map the hosts ports like you have done before.
The second option does the configuratio in one place which is easier to manage.