install gitlab as docker
https://www.jianshu.com/p/24959481340e
https://www.cnblogs.com/zuxing/articles/9329152.html
gitlab docker
docker pull gitlab/gitlab-ce:latest
mkdir -p gitlab/config
mkdir -p gitlab/logs
mkdir -p gitlab/data
--hostname localhost \
sudo docker run --detach \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /opt/dockerRoot/dockerData/gitlab/config:/etc/gitlab \
--volume /opt/dockerRoot/dockerData/gitlab/logs:/var/log/gitlab \
--volume /opt/dockerRoot/dockerData/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
docker exec -it gitlab vim /etc/gitlab/gitlab.rb
docker restart gitlab
docker exec -it gitlab vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
docker exec -it gitlab update-permissions
docker restart gitlab
原文:https://www.cnblogs.com/SZLLQ2000/p/11970485.html