docker run --detach --hostname gitlab.local.cn:28080
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.local.cn:28080/'; gitlab_rails['lfs_enabled'] = true;"
--name gitlab --restart always
--publish 28043:443
--publish 28080:28080
--publish 28022:22
-v /usr/local/gitlab/config:/etc/gitlab
-v /usr/local/gitlab/logs:/var/log/gitlab
-v /usr/local/gitlab/data:/var/opt/gitlab
--privileged=true
gitlab/gitlab-ce:12.10.11-ce.0
cp /var/opt/gitlab/backups/XXXXX_2020_01_06_11.3.4-ee_gitlab_backup.tar /usr/local/gitlab/data/backups/
备份恢复后:cp /etc/gitlab/gitlab-secrets.json /usr/local/gitlab/config/gitlab-secrets.json
这里面有一些gitlab的密码要了恢复。
docker exec -it gitlab gitlab-rake gitlab:backup:restore BACKUP=1578305914_2020_01_06_11.3.4-ee
docker exec -it gitlab /bin/bash
docker network disconnect --force bridge gitlab
docker run --detach
--publish 8443:443 --publish 8080:80
--name gitlab --restart unless-stopped
--volume /mnt/sda1/gitlab/etc:/etc/gitlab --volume /mnt/sda1/gitlab/log:/var/log/gitlab
--volume /mnt/sda1/gitlab/data:/var/opt/gitlab
--privileged=true beginor/gitlab-ce
119.29.11.237,mirco,publish,wyttest,微邮筒发布机
docker network disconnect --force bridge gitlab