Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/jiegemena/article/details/88745501
docker gitlib build
1, docker command builds
sudo docker run -v /etc/localtime:/etc/timezone:rw -v /etc/localtime:/etc/localtime:rw -d -p 8443:443 -p 8081:80 -p 8022:22 --name gitlab --restart always --volume /home/gitlab/config:/etc/gitlab --volume /home/gitlab/logs:/var/log/gitlab --volume /home/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest
2, access and test
- First start slow (Wait ten minutes),
- Then access to the page in the corresponding http://xxx.xxx.xxx:8081 link.
- Initial use, we need to create the default administrator password. Once logged in,
- Create a project bug,
In the path of the project clone should have been: Local 8081, into a host name.
3, modify the configuration (fix bug)
Modify external_url
sudo docker exec -it gitlab /bin/bash vim /etc/gitlab/gitlab.rb
Find command vim / external_url
modify external_url to
external_url " http://xxx.xxx.xxx:8081 "
4, the mirror rebuild
sudo docker stop gitlab
sudo docker rm gitlab
sudo docker run -v /etc/localtime:/etc/timezone:rw -v /etc/localtime:/etc/localtime:rw -d -p 8443:443 -p 8081:8081 -p 8022:22 --name gitlab --restart always --volume /home/gitlab/config:/etc/gitlab --volume /home/gitlab/logs:/var/log/gitlab --volume /home/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest