linuxdockerquay.io

How to switch from docker.io to quay.io?


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:

  1. Create quay repository MYUSERNAME/centos
  2. Logout from docker.io
# docker logout docker.io
  1. Login to quay.io
# docker login quay.io
  1. I fill the credential
  2. I create new tag
# docker tag IMAGEID MYUSERNAME/centos:7
  1. I push my image to quay
# 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.


Solution

  • In super short, the tag is in format site/something/name:tag where:

    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