1. Obtain Mirror
[root@master_150 ~]# docker pull beginor/gitlab-ce
或
找链路好的服务器下载镜像,再导出导入到本地环境
2. gitlab configuration (etc), log (log), to the data (data) into the container to facilitate future upgrades
[root@master_150 ~]# mkdir -p /data/gitlab/etc
[root@master_150 ~]# mkdir -p /data/gitlab/log
[root@master_150 ~]# mkdir -p /data/gitlab/data
3. Run the Mirror
[root@master_150 ~]# docker run \
--detach \
--publish 8443:443 \
--publish 8090:80 \
--name gitlab \
--restart unless-stopped \
-v /data/gitlab/etc:/etc/gitlab \
-v /data/gitlab/log:/var/log/gitlab \
-v /data/gitlab/data:/var/opt/gitlab \
beginor/gitlab-ce
4. Modify gitlab.rb, deployed into the external_url domain name or IP address of the machine
[root@master_150 ~]# vim /data/gitlab/etc/gitlab.rb
external_url 'http://106.12.196.33'
5. 修改 gitlab.yml
[root@master_150 ~]# vim /data/gitlab/data/gitlab-rails/etc/gitlab.yml
host: 106.12.196.33
port: 8090