我使用GitLab CE docker鏡像,並希望在主機的不同端口上公開GitLab。這是GitLab文檔的錯誤嗎?
我從offical documentation讀一些說明:
要公開Web界面上8929和SSH服務上2289使用下面的碼頭工人運行命令:
sudo docker run --detach \
--hostname gitlab.example.com \
--publish 8929:80 --publish 2289:22 \
...
gitlab/gitlab-ce:latest
第二,你需要配置gitlab.rb:
#Set external_url:
external_url "http://gitlab.example.com:8929/"
...
# Set gitlab_shell_ssh_port:
gitlab_rails['gitlab_shell_ssh_port'] = 2289
但啓動容器後,我發現在容器中 gitlab可以從http://localhost:8929訪問,但不是http://localhost:80。
也許文件出錯了,但是錯誤太愚蠢了,我不確定。
我覺得第二步不需要,是嗎?
在容器的http://本地主機:8929正確地顯示。但我想從主機訪問此網址。事實上,從主機訪問這個URL返回一個連接拒絕。它沒有配置'gitlab.rb'就像我想要的那樣工作。 – Malloc