
Gitlab에서 pipeline을 만들고 registry가 있는 상태에서 진행한다. 1. deploy.sh 편집 관리자 권한에서 진행하므로 /home/ubuntu 디렉토리로 이동후 편집한다. vim deploy.sh 로 편집 #!/bin/bash set -ex # Gitlab에서 빌듣된 docker image 가져옴 docker pull :latest | grep "Image is up to date" && pull_status="already_pulled" || pull_status="newly_pulled" echo $pull_status # build가 새로되었을 경우 실행 # 기존 container 정지 및 삭제 # 새롭게 container 실행 if [ "$pull_status" = "newly..