Fagam32
Fagam32

Reputation: 93

Gitlab CI. Error response from daemon: No such image

.gitlab-ci.yml

image: docker:stable
...
...

heroku_publishing:
    stage: publish_image
    services:
        - docker:dind
    script:
        - docker login --username=_ --password=$HEROKU_AUTH_KEY registry.heroku.com
        - docker login --username=$DOCKER_LOGIN --password=$DOCKER_PASSWORD
        - docker tag fagam32/study_project_backend:latest registry.heroku.com/study-project-backend/release
        - docker push registry.heroku.com/study-project-backend/release
#    needs:
#        - build
    allow_failure: false
deploy:
    stage: deploy
    image: buddy/heroku-cli:latest
    script:
        - heroku container:release release
    needs:
        - heroku_publishing
    when: manual

I'm trying to tag image to push it to heroku image registry. Locally it works fine, but job fails with such message:

$ docker tag fagam32/study_project_backend:latest registry.heroku.com/study-project-backend/release
Error response from daemon: No such image: fagam32/study_project_backend:latest

What am I doing wrong?

Upvotes: 2

Views: 5706

Answers (1)

Fagam32
Fagam32

Reputation: 93

Just do docker pull before tagging and everything works fine

Upvotes: 4

Related Questions