Push to docker registry fails with `tag does not exist` registry.digitalocean.com/mailio/mailiofrontend:latest
igorrendulic opened this issue · comments
It seems like this might be outdated? It's been working for me for the past 100 deployments up until 1 month ago.
Run docker push registry.digitalocean.com/myrepo/static-example
Using default tag: latest
The push refers to repository [registry.digitalocean.com/myrepo/static-example]
tag does not exist: registry.digitalocean.com/myrepo/static-example:latest
Error: Process completed with exit code 1.
Github workflow fix is to add the tag when pushing to registry:
...
- name: Push image to DigitalOcean Container Registry
run: docker push registry.digitalocean.com/myrepo/static-example:$(echo $GITHUB_SHA | head -c7)
...
Thanks for pointing this out! Looks like this was a change in behavior in Docker 20.10.0
docker push
now defaults to latest tag instead of all tags moby/moby#40302
https://docs.docker.com/engine/release-notes/#20100
They did add an --all
flag that retains the previous behavior, but we should probably be explicit. I've updated the example with your suggestion.