In this article, we will find out how you can get started with Docker and Azure. To get started with Docker on your local Dev machine, you got to have to install the Docker desktop application.
First, head over to www.docker.com, then select ”Products,” and then we’ll go to Docker Desktop.
Here, you’ll be able to choose the application for your respective operating system, whether it’s Docker for Mac or even Docker for Windows.
After you’ve downloaded the installation file and run-through to setup, you should have a Docker icon living inside of your taskbar. The green icon means that the ”Docker is running”.
Now, another way that we could verify that Docker is running, is to open our terminal. So here we have a terminal open, and we’ll type the below command:
This will give some quick information about what’s running on our machine as shown below:
Another command that we can run to test is given below:
Here we can see information about the Docker client and server that we have on our machine.
Docker is all about images. If we type the below command, we should be able to see all the images that we have running on our machine.
It would result in something like below:
Note: Since we had Docker set up and running already, we already have some images here. But if this is your first time running Docker, you’re probably not going to see anything available on the screen
You can either create your own images or you can even pull them down from an image repository online. Let’s head back to the Docker website. If we go to products and click on ”Docker Hub”, it should take us to this website where we could search for various images.
Here, we’re going to click ”Go To Docker Hub”.
And now we will search for an aspnetcore image.
So, here we can see one, that says microsoft/asp.netcore-build, and we can browse this page to learn exactly how we can make use of this image.
On this right-hand side, we’ll copy this Docker command. That allows us to pull the image down to our local machine.
Back in my terminal, we’ll enter the command the following command with the name of the image we want to pull down:
docker pull [IMAGE NAME]
Then, in just a few minutes, Docker is got to reach out into that registry and pull on all we need to run that image locally here on our Dev machine.
As the download is completed, it means that if we type the below command:
We should see that microsoft/asp.netcore-build image that we just pulled down from the Docker Hub.
Now, we should be able to take that image and create running containers on our local machine.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.