docker 安装 gitlab

docker run --detach 
  --hostname 192.168.7.50 
  --publish 8443:443 --publish 80:80 --publish 8222:22 
  --name gitlab 
  --restart always 
  --volume /hytd/gitlab/config:/etc/gitlab 
  --volume /hytd/gitlab/logs:/var/log/gitlab 
  --volume /hytd/gitlab/data:/var/opt/gitlab 
  --privileged=true 
  gitlab/gitlab-ce:latest

编辑 /hytd/gitlab/config/gitlab.rb 添加配置

external_url 'http://192.168.7.50'
gitlab_rails['gitlab_ssh_host'] = '192.168.7.50'

重启docker容器实例

sudo docker restart gitlab
原文地址:https://www.cnblogs.com/xiaojf/p/14626324.html