Docker - Day -06
Pulling:
Pulling images from Public Registry:
Authentication is not required to pull images from public registries, such as the official Ubuntu image on Docker Hub.
Example: docker pull ubuntu
docker pull ubuntu:20.04

Pulling images from Private Registry:
Authentication is required to pull images from private registries.
Attempting to pull an image from a private registry without logging in will result in an access denied error:

docker pull gcr.io/organization/ubuntu Using default tag: latest Error response from daemon: Head "https://gcr.io/v2/organization/ubuntu/manifests/latest": denied: Artifact Registry API has not been used in project 109343217046 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/artifactregistry.googleapis.com/overview?project=109343217046 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Pushing
Pushing images to Public Registry :
You can’t push the images to the official Docker public registry, and if you do, you will get the following error message Access denied.

Pushing images to Private Registry
You must authenticate before pulling from or pushing to private registries.
Make sure your credentials have the necessary permissions.
You can see in the screenshot below, I have logged in to my private Docker account, ajapatil26.

Before pushing the image, you need to tag it with tag registryname:reponame:version
Example: docker tag ubuntu ajaypatil26/ubuntu:v1

You can see below that the image is pushed to my personal private registry.
