[Git Actions / Docker] An image does not exist locally with the tag: [repo]/[image]트러블슈팅2023. 9. 15. 18:46
Table of Contents
728x90
728x90
에러 메세지
An image does not exist locally with the tag: [repo]/[image]
아래와 같은 action.yml을 사용하고있었는데 계속해서 리파지토리에 이미지를 빌드한 후 태그를 못잡아 주는 것 같았다.
name: Docker Image CI
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login Dockerhub
env:
DOCKER_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- name: Build the Docker image
run: docker build -t cicd-test .
- name: Push to Dockerhub
run: docker push mag123c/cicd-test:latest
해결
- name: Build the Docker image
run: docker build -t cicd-test .
# 추가
- name: taging
run: docker tag cicd-test:latest mag123c/cicd-test:latest
- name: Push to Dockerhub
run: docker push mag123c/cicd-test:latest
참조
https://kb.vmware.com/s/article/54792
728x90
300x250
@mag1c :: 꾸준히 재밌게
2023.04 ~ 백엔드 개발자의 기록
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!