I need help how to switch from image registry server from docker.io to quay.io. My cases is I pull centos image from hub.docker.com and I want to push it to quay.io. I have login to my quay.io but when I try to push to quay like this shell that was not working. Here are my step to switch to quay.io:
# docker logout docker.io
# docker login quay.io
# docker tag IMAGEID MYUSERNAME/centos:7
# docker push MYUSERNAME/centos:7
Here is output I got for the last shell command:
The push refers to repository [docker.io/MYUSERNAME/centos]
2653d992f4ef: Preparing
denied: requested access to the resource is denied
I can see that registry image server still pointed to docker.io.
How to solve this? Thank you.
In super short, the tag is in format site/something/name:tag
where:
site
is missing, it is assumed to be docker.io
(can't be changed)something
is missing, it is assumed to be library
.:tag
is missing, it is assumed to be latest.So for example docker pull alpine
is the same as docker pull docker.io/library/alpine:latest
.
If you want to use a repository with different address, you have to explicitly give its name when tagging:
docker tag IMAGEID quay.io/MYUSERNAME/centos:7
docker push quay.io/MYUSERNAME/centos:7