First make sure that the machine has docker installed
Recommend more than 2G of virtual machine memory
1. Download the image file
docker pull beginor/gitlab-ce:11.0.1-ce.0
Note: Be sure to configure Alibaba Cloud's accelerated image
2. Create GitLab's configuration (etc), log (log), and data (data) outside the container to facilitate future upgrades, so please prepare these three directories first.
mkdir -p /mnt/gitlab/etc
mkdir -p /mnt/gitlab/log
mkdir -p /mnt/gitlab/data
3. Run GitLab container
docker run \
--detach \
--publish 8443:443 \
--publish 8090:80 \
--name gitlab \
--restart unless-stopped \
-v /mnt/gitlab/etc:/etc/gitlab \
-v /mnt/gitlab/log:/var/log/gitlab \
-v /mnt/gitlab/data:/var/opt/gitlab \
beginor/gitlab-ce:11.0.1-ce.0
4. Modify /mnt/gitlab/etc/gitlab.rb, change external_url to the domain name or IP address of the deployment machine
vi /mnt/gitlab/etc/gitlab.rb
external_url 'http://192.168.212.227'
5. Modify /mnt/gitlab/data/gitlab-rails/etc/gitlab.yml
vi /mnt/gitlab/data/gitlab-rails/etc/gitlab.yml
Keyword found * ## Web server settings *
Change the value of host to the mapped external host ip address and port, which will be displayed here in the gitlab clone address
So far, the web management page of gitlab can be accessed normally