一、安装环境
操作系统:CentOS6.7
Docker服务:docker/1.7.1
安装GitLab前请确保以上环境都已安装
二、升级方式
- 停用旧版本Gitlab容器
➜ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
630ab13478f4 gitlab/gitlab-ce:latest "/assets/wrapper" 13 months ago Up 5 months 0.0.0.0:20022->22/tcp, 0.0.0.0:20080->80/tcp, 0.0.0.0:20443->443/tcp gitlab
➜ docker stop 630ab13478f4
- 下载最新版本Gitlab
➜ docker pull gitlab/gitlab-ce:latest
- 启用新版Gitlab容器
➜ docker run --detach \
--hostname gitlab.example.cn \
--publish 20443:443 \
--publish 20080:80 \
--publish 20022:22 \
--name gitlab-201810 \
--restart always\
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
- 查看新版Gitlab容器
➜ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3f1f389d78de gitlab/gitlab-ce:latest "/assets/wrapper" 17 minutes ago Up 17 minutes 0.0.0.0:20022->22/tcp, 0.0.0.0:20080->80/tcp, 0.0.0.0:20443->443/tcp gitlab-201810
网友评论