Skip to content

Commit

Permalink
workflow docker pull 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
semnisem committed Jul 17, 2024
1 parent 0881114 commit 17477a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/dev-cv-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -74,12 +74,14 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}


- name: Pull Docker Image
run: sudo docker pull ${{ env.DOCKER_IMAGE }}:${{ env.TAG }}

- name: Docker run
run: |
sudo docker stop ${{ env.NAME }} || true
sudo docker rm ${{ env.NAME }} || true
sudo docker rmi ${{ env.DOCKER_IMAGE }}:${{ env.TAG }} || true
sudo docker run -d --name ${{ env.NAME }} -p 8000:8000 --restart always ${{ env.DOCKER_IMAGE }}:${{ env.TAG }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# 파이썬 이미지 사용
FROM python:3.12

# 라벨 추가
LABEL org.opencontainers.image.source="https://github.com/AI-SIP/MVP_CV"

# 작업 디렉토리 설정
WORKDIR /test

Expand Down

0 comments on commit 17477a9

Please sign in to comment.