Docker: Tag and Push to the Private Registry
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:
- where to push
- 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
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 !