Docker容器gitlab版本升級
參考文檔
https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
11.11.8 is the last version in version 11. 12.0.x is a required step.
版本升級路線
11.11.3-ce.0 –> 11.11.8-ce.0 –> 12.0.12-ce.0 –> 12.10.0-ce.0
-
進入dokcer 容器gitlab
sudo docker exec -i -t gitlab /bin/bash
-
停止全部服務
gitlab-ctl stop
-
exit退出容器
-
停止dokcer容器gitlab
sudo docker stop gitlab
再刪除容器
sudo docker rm gitlab
-
運行新版本gitlab容器(注意升級版本的選擇)
sudo docker run --detach \ --hostname 172.20.xxx.xxx \ --publish 443:443 \ --publish 8090:80 \ --publish 2222:22 \ --name gitlab \ --restart always \ --privileged=true \ --volume /srv/gitlab/config:/etc/gitlab \ --volume /srv/gitlab/logs:/var/log/gitlab \ --volume /srv/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:11.11.3-ce.0
備註:只用修改gitlab版本,掛載目錄中的數據不要刪除