Docker: Tag and Push to the Private Registry

Docker Jul 12, 2023

First of all you need to check that you have access to the registry.

For my case, Azure, it is as simple as typing az login

Preparing Image

Before all you have to have the image you want to push you can check it with

docker image ls

Tagging

Then we need to tell the docker by ‘tagging’ the image this will tell:

  1. where to push
  2. version
docker tag my-go-images tanutregistry.azurecr.io/my-go-images

In this case I tag my image to Azure without version which will be lastest by default

I check the result with

docker image
REPOSITORY TAG
tanutregistry.azurecr.io/my-go-images latest

Pushing

Now we tell the Docker to push the image

docker push tanutregistry.azurecr.io/my-go-images

This is the general command.

It will push everything that belongs to the repo in docker push <repo>

Here we go. The images is up to the registry.

Cheers !

Tags

TeamCMD

We are CODEMONDAY team and provide a variety of content about Business , technology, and Programming. Let's enjoy it with us.