If you are already familiar with Docker and Docker Hub then in this post I’d like to introduce the Azure Container Registry which is an alternative to the well-known Docker Hub.
Things required before starting:
- Docker Desktop
- Azure CLI
- Azure Account
In order to start with Azure Container Registry, you need an Azure account which you can create easily with FREE Credits and also ACR is a very cheap service. Once you logged into Azure, Navigate to Azure Container Registry by clicking on New --> Search --> type Azure Container Registry. After that create a new ACR by filling in all details you want to add but make sure you enable admin access. After Two or three minutes your ACR will be created.
Once you created a resource navigate Access Keys to get the Login server, Username, and password which is required for the command line push your local Docker image to ACR.
Type Above fig command and replace [login-server] with your ACR resource EG: firstapp.azureacr.io [username] with firstapp and [password] with the hash password. Once completed, you should see Login succeeded! Message. After this you need to build your docker image with this command
docker build –f ./Dockerfile . –t node_vue_app
Final step is to push your local Docker image to ACR. Follow below image command to push. Keep in mind though that these repositories are private by default, which means that you have to perform authentication first.
And that’s it. You can make use of this container registry just like you used. In Part 2 we will see how we can deploy same thing using CI/CD with GitHub Workflow
Top comments (0)