docker安装gitlab:
docker run --detach \
--restart always \
--publish 8433:443 --publish 880:80 --publish 822:22 \
--name gitlab \
--volume /home/gitlab/config:/etc/gitlab \
--volume /home/gitlab/logs:/var/log/gitlab \
--volume /home/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
-p 880:80 将容器内80端口映射至宿主机880端口,这是访问gitlab的端口
-p 822:22 将容器内22端口映射至宿主机822端口,这是访问ssh的端口
web访问gitlab:
http://192.168.11.45:880
注册,使用注册的用户登录报错:
Your account is pending approval from your GitLab administrator and hence blocked. Please contact your GitLab administrator if you think this is an error.

本文详细介绍了如何使用Docker安装GitLab,包括解决注册后账户待批准的问题、配置GitLab的外部URL以及调整端口映射。在遇到GitLab容器内生成的URL为容器ID时,需在gitlab.rb和gitlab.yml中修改配置,并通过gitlab-ctl reconfigure应用变更。最后,调整nginx监听端口以确保正确访问GitLab。
最低0.47元/天 解锁文章
1169





