Creating Deployable Images
Analyze and Integrate Docker Multi-Stage Builds
The course is part of these learning pathsSee 2 more
This course is designed to give you a solid understanding of containers and how they are used in Azure DevOps. It begins by looking at creating deployable images through Docker containers, microservices, and at the various container-related services available in Azure, including Azure Container Instances, the Azure Kubernetes Service, the Azure Container Registry, Azure Service Fabric, and Azure App Service.
The course also looks at Dockerfile and Docker multi-stage builds before finishing with a hands-on demonstration that shows you how to create an Azure Container Registry.
For any feedback relating to this course, please contact us at email@example.com.
- Learn about Docker and its role in deploying containerized apps
- Understand how microservices can be used for deploying apps
- Learn about the container-related services available in Azure
- Learn about using multi-stage builds when working with Docker
- Gain a practical understanding of how to create an Azure Container Registry
- Gain a practical understanding of how to add Docker support to an application
This course is intended for DevOps professionals who wish to learn how to use containers to design and implement strategies for developing application code and infrastructure that allow for continuous integration, testing, delivery, monitoring, and feedback.
To get the most from this course, you should have a basic understanding of the Azure platform and of container concepts.
So now that our my9878 container registry has been deployed. Let's log into it using the Azure CLI from my workstation. So let me bounce down here. I actually have my PowerShell running and my Docker terminal here. So let's open up PowerShell here. And from PowerShell what I'm going to do is run the az acr login command. And when I do this, I need to specify the name of my repository.
Now oddly enough, I don't need to nor should I include the azurecr.io domain name when I specify the name for my repository here. So we bounced back out to overview. See the full login server here, my9878.azurecr.io Instead, I just use the name that I gave my repository. So we'll go ahead hit enter here and we can see that our login has succeeded. Now what we're going to do into this exercise is push the basic hello world image up to my container registry. That being said, I have to obtain that hello world image first and I'm going to obtain that from Docker Hub.
Now to do that, I'm going to switch over to my Docker terminal here. Now from Docker terminal, what I'm going to do is run a Docker pull hello world command and what this will do is pull the latest hello world image from Docker.io So it's coming from Docker Hub. Now before we push this image into our container registry. We need to first tag it with the fully qualified domain name of our ACR login server.
If we bounce out to our Azure portal, we can see the FQDN for our login server is my9878.azurecr.io So that's what we're going to use here. So let's bounce back into our terminal here. And we're going to use the Docker tag command to perform this tagging. Along with the tag command, we need to specify the image. After specifying the name of the image we want to tag, we need to specify the ACR login server. And with that we need to specify the name of our image and the versioning for it.
So we'll go ahead and tag it. And then what we'll do now is perform the push using the Docker push command. And essentially we're going to specify the name we just called in the Docker tag command. And we can see it prepares and then pushes and tells us the image has been pushed. To confirm that our image has been pushed, we can go into our portal and then take a look at our repositories. And we can see hello world is now listed as a repository.
At this point, we can now try to run the image from our container registry. And to do that we'll bounce back down into our Docker terminal. And from here we'll use the Docker run command. So we'll go Docker run and again, we'll specify the image from our registry. And if we look closely here we can see we get a message from Docker telling me that our installation appears to be working correctly.
So with that, we've deployed a container registry in Microsoft Azure using the portal. We used Azure CLI within Azure PowerShell from our local workstation to log in to our registry. And then we used the Docker terminal to pull down an image from Docker Hub. We tagged it and then we pushed that image up into our own registry. Once we confirmed that the push was successful, we were also able to successfully run the image from our registry. So with that let's call it a wrap.
Tom is a 25+ year veteran of the IT industry, having worked in environments as large as 40k seats and as small as 50 seats. Throughout the course of a long an interesting career, he has built an in-depth skillset that spans numerous IT disciplines. Tom has designed and architected small, large, and global IT solutions.
In addition to the Cloud Platform and Infrastructure MCSE certification, Tom also carries several other Microsoft certifications. His ability to see things from a strategic perspective allows Tom to architect solutions that closely align with business needs.
In his spare time, Tom enjoys camping, fishing, and playing poker.