리눅스(ubuntu)/Git 관련
git 업그레이드 하기(docker용 버전업)
감데공
2017. 5. 11. 10:12
1. gitlab.com ->community -> document -> omnibus로 들어가 문서를 확인한다.
2. 여기서는 docker 용을 업그레이드 하기때문에 docker 문서를 참조한다.
-------------------------------------------------------------------------------------------------
1. 기존에 있는 docker git 이미지를 백업한다.
docker commit 명령어 사용.
2. docker pull 명령어를 이용해 gitlab 최신 이미지를 받는다.
EX) sudo docker pull gitlab/gitlab-ce:latest
3. 기존 docker git 이미지를 stop하고 rm 한다.
4. 새로받은 gitlab 이미지를 실행한다. 옵션은 기존과 동일하게.
EX)
sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--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