gitlab docker
内存大于8G
# 拉取Gitlab镜像
docker pull gitlab/gitlab-ce:latest
# 启动容器
docker run \
-itd --name gitlab \
-p xxxx:80 \
-p yyyy:22 \
-e GITLAB_OMNIBUS_CONFIG:"external_url 'http://x.x.x.x:xxxx' gitlab_rails['gitlab_shell_ssh_port'] = yyyy" \
-v /home/gitlab/etc:/etc/gitlab \
-v /home/gitlab/log:/var/log/gitlab \
-v /home/gitlab/opt:/var/opt/gitlab \
--restart always \
--privileged=true \
--name gitlab \
gitlab/gitlab-ce
#http://x.x.x.x:xxxx 为服务端ip:端口
#yyyy为ssh端口
#能打开页面后,执行获取root密码
sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
参考:
https://blog.csdn.net/BThinker/article/details/124097795
https://baijiahao.baidu.com/s?id=1735404739948635473&wfr=spider&for=pc
https://docs.gitlab.com/ee/install/docker.html