docker gitlab社群版搭建之非標準埠
阿新 • • 發佈:2018-12-17
gitlab社群版
docker run --detach --hostname git.example.com --publish 1443:443 --publish 1080:80 --publish 1022:22 --name gitlab --restart unless-stopped --volume /mnt/sda1/gitlab/etc:/etc/gitlab --volume /mnt/sda1/gitlab/log:/var/log/gitlab --volume /mnt/sda1/gitlab/data:/var/opt/gitlab --privileged=true beginor/gitlab-ce:11.3.0-ce.0
gitlab_rails['gitlab_shell_ssh_port'] = 1022
http非標準埠修改
/gitlab/data/gitlab-rails/etc/gitlab.yml
在這一行下修改: ## Web server settings (note: host is the FQDN, do not include http://)
host:git.example.com
port:1080
最後修改 /etc/hosts
例:伺服器ip:192.168.1.666
則設定:
192.168.1.666 git.example.com
windows下,自行搜尋下更改hosts就可以啦!