Learn Docker with . NET Core | Asfend Yar | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

Learn Docker with . NET Core

teacher avatar Asfend Yar

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Introduction

      0:43

    • 2.

      Course Structure

      1:22

    • 3.

      Prerequisites

      1:15

    • 4.

      What is docker

      2:54

    • 5.

      Containerization

      1:23

    • 6.

      Docker Containers Vs Virtual Machines

      4:13

    • 7.

      Docker Files Images and Containers

      1:47

    • 8.

      Installation Module Overview

      0:38

    • 9.

      Docker Hub

      1:32

    • 10.

      Install Docker Inside Windows Machine

      3:18

    • 11.

      Docker Hello World

      2:02

    • 12.

      Docker Pull Vs Run

      2:46

    • 13.

      Create Net Core Project

      2:20

    • 14.

      Add Docker Support

      1:38

    • 15.

      Build Docker Image

      4:28

    • 16.

      Check Docker Image

      0:59

    • 17.

      Run Docker Container

      1:55

    • 18.

      Run Docker Container Implementation

      3:48

    • 19.

      Deployment Module Overview

      0:25

    • 20.

      Push Docker Image

      1:24

    • 21.

      Push Docker Image To Docker Hub

      1:57

    • 22.

      Deploy Docker Image

      4:14

    • 23.

      Pull Image Module Overview

      0:30

    • 24.

      Pull Docker Image

      2:34

    • 25.

      Run Docker Image Inside The Container

      1:43

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

84

Students

--

Projects

About This Class

Welcome to the Docker course with .Net Core.

This course is made with Docker & .Net Core. The main focus of this course is on the Docker technology. If you have no prior experience of Docker then this course is a perfect jumpstart for you. But keep in mind to complete this Docker course you must have a basic knowledge of Rest Api's Or Web Application with .Net Core .

So if you're familiar with  Asp.Net Core and if you want to learn docker then this is the right course for you.

If you don't have any idea about Docker then don't worry because in this course we'll cover all the Docker concepts.

By getting this course, you can be rest assured that the course is carefully thought out and edited. And I'm always happy to make the helpful content for the students.

So by the end of the course, you'll completely understand:

  • What is Docker ?

  • How to setup development environment.

  • Create Sample .Net Core Web Application.

  • Build Docker Image.

  • Run Docker Container.

  • Push Docker Image to Docker Hub.

  • Deploy Docker Image inside Azure Container Instance.

  • Pull Docker Image inside another machine.

Welcome to the Docker course with .Net Core.

This course is made with Docker & .Net Core. The main focus of this course is on the Docker technology. If you have no prior experience of Docker then this course is a perfect jumpstart for you. But keep in mind to complete this Docker course you must have a basic knowledge of Rest Api's Or Web Application with .Net Core .

So if you're familiar with  Asp.Net Core and if you want to learn docker then this is the right course for you.

If you don't have any idea about Docker then don't worry because in this course we'll cover all the Docker concepts.

By getting this course, you can be rest assured that the course is carefully thought out and edited. And I'm always happy to make the helpful content for the students.

So by the end of the course, you'll completely understand:

  • What is Docker ?

  • How to setup development environment.

  • Create Sample .Net Core Web Application.

  • Build Docker Image.

  • Run Docker Container.

  • Push Docker Image to Docker Hub.

  • Deploy Docker Image inside Azure Container Instance.

  • Pull Docker Image inside another machine.

Note : This is a short course to learn docker and this course is specially designed for those students who are new in this docker field. If you're experienced developer and already know how to work with docker then this course is not for you.

Meet Your Teacher

Teacher Profile Image

Asfend Yar

Teacher
Level: All Levels

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hi everyone. It's a span here and welcome to this course. I'm extremely happy that you are starting your journey to learn darker. This course is all about Docker. Let me tell you who can take this course. Well, if you don't have any knowledge of darker, then don't worry, this course is a perfect start for you. And you'll learn all the fundamentals of Docker has an absolute beginner. If you have created any RESTful APIs with darkened gore or any other application with dotted code, no matter how large or small it will be, then this course is a perfect start for you to learn darker. So are you excited to learn docker ps that let's get started. 2. Course Structure: In this course, you will learn how to work with Docker using doctrine core. Let me tell you what will be coming up in the next few sections. First, we'll start with the basics of darker, like what is Docker? Containerization, Virtual Machines, docker files, images and containers. Right after that, we'll install Docker inside our machine. And then we'll run a simple hello-world image and discuss about Docker pull and docker run. Once we'll set up the development environment, then we'll create a basic ASP.net Core built-in web application. And we'll add the Docker support inside our application. After adding the darker support, will first build a Docker image. And then we'll learn the image inside the Docker container. Right after this step, will cover the deployment part. And they will push the Docker image to Docker Hub. And then we'll run the Docker Hub image inside the Microsoft Azure Container Instance. And finally, we'll also set up another machine, pull the Docker image from the Docker Hub and run it inside that machine. The time is very short and we have lots of things to learn. So let's start learning from the next lesson. 3. Prerequisites: In this lesson, I want to tell you what are the prerequisites of this course. We'll start the Docker topic from absolute beginning. But you must have a basic knowledge of ASP.net Core and you have installed the ways to deal with Don Corleone. I also want to set the right expectations for you so that you can learn quickly and efficiently. This course is all about Docker and little target, dot and core for building and running the Docker images will not cover anything about dominant chord, like how to make a complete website or RESTful APIs. In this course, There's only few minutes section in which we will be working on, we'll Studio and with dotnet core. And the rest of the course, we'll be using Docker technology for building and running images. There are lots of courses which you can take from the Internet and learn darker. So what's unique in this course? Well, obviously along with the course, you'll get a question-answer support. If you will face any errors during installation or configuration, then feel free to ask questions and I'll be happy to answer you. Alright? I hope you are on the same page. Now let's start learning. 4. What is docker: In this lesson, we're going to learn what is Docker and why we need to learn darker. Let's start with a simple example. Suppose you are making a software in C-Sharp programming language. You need to use different kinds of NuGet packages, libraries, and dll files during the creation of the software. Now let's say you have created the software successfully and it works on your machine perfectly, then your boss will give you an instruction to share the software code. When the client, the client will pull or download your code from your GitHub repository. And inside this machine, once he executes the software, you will face different issues because the client is a lemon and he cannot fix those issues. Now the client will tell your boss that a given software will not work. Your boss will ask you about this issue and you have a valid reason that the software will work on your machine. And you know, what are the remarks of your boss? I'm not gonna give your machine to the client. This is the biggest issue we're facing these days. The software will work on the development machine. But as soon as we will ship the software to the client machine or in the production, will have to face many issues. Okay, let's dive deeper. Suppose you have deployed the software, the software quality Destiel machine. And after execution, many errors appears. Most likely the installation packages or dealer file errors, or maybe some versioning errors for required packages. As you know, how difficult it is to troubleshoot the installation issues and install the required packages. Sometimes it takes several hours to fix the issues. It's really a time-consuming process. Now to overcome this problem, we'll use the technical term containerization. And Docker is the company who will provide the service of containerization. So with the containerization, you'll simply define the requirements like what packages deal files are required to run this software in that machine where you are making the software. And later you'll just deploy that container to any machine where your software quality district will want to test the software. You can also deploy the container to the client machine or even in the production machine. And this time, no one will face the error. Now what is Docker? In simple words, docker is a platform for software developers to build, run and should the applications with containers. Now, in the next lesson, we'll take a look at containers. 5. Containerization: In this lesson, we'll explore what is container and containerization. Container is a standard unit of software that packages up code and all its dependencies. The application runs quickly and reliably from one computing environment to another. And the use of continuing to deploy application is called containerization. Let me tell you the use case of containerization. Containerization allows developers to create and deploy applications faster and securely. When we talk about the traditional methods, then the activation or any software is developed in a specific environment. When we deploy the software or application to the new environment, then this will often result in bugs and issues about containerization, eliminates that kind of problem. But just bundling the application source code together with the related configuration files, libraries, binaries, and dependencies that are required to run the software or web application. Okay, Now, when we talk about container, then another term came into your mind, which is Virtual Machine. So let's compare that containers with a virtual machine in the next lesson. 6. Docker Containers Vs Virtual Machines: In the last lesson, we've talked about the containers. Now in this lesson, let's compare the container and virtual machines. So what's the difference between the container and the virtual machine? Well, in virtual machine, we have an infrastructure which is your laptop or some cloud server. And on top of that, we have a host operating system. And in case of your laptop, this could be a Mac OS or Windows operating system. And then we have our hypervisor. Hypervisor is a software that creates and run virtual machines. There are two types of hypervisors. The first type is type one and the other is type two. Type one hypervisors. We have hyper get on Mac OS and Hyper-V on Windows. And type two hypervisors, we have VirtualBox and VMware. Type one hypervisors are more efficient because they can bypass host operating system and interact directly with the hardware. Okay, So the next layer is the guest operating system. Let's say we want it to run three applications on a server, which requires three guest operating systems. And they can all be controlled by your hypervisor. The problem here is each guest operating system contains one GB of memory and three guest operating system contains three GB of RAM. Your guest operating system, everyone gets worse because each guest OS will need its own CPU and memory. Then on top of the guest OS, there is a layer of binary and libraries which are application needs to run. For example, you might need sql Server packages installed in order to connect your web application with the MS SQL database. You might need a doctrine called STK in order to run the dotnet Core web application. Finally, we have our application. This is the source code of whatever application you have built. So that's how you run your application inside a virtual machine. Now let's talk about the container. In case of container, we still have an infrastructure like your laptop or some gold server. We also have host operating system, but we don't have a hypervisor. Instead, we have a Docker container daemon. The Docker daemon is a new thing here. It's a service which runs in the background on your host operating system. And it manages everything required to run and interact with Docker container. Next we have binaries and libraries dislike in case of virtual machine. But instead of running on the guest operating system, these binaries and libraries are built into a special package called Docker images. The Docker daemon run those images. And the last thing is your application. Each one will reside in his own Docker image, will be managed independently by the Docker daemon. Typically, each application and its binaries and libraries are packed into the same Docker image. In order to run the Docker images, we don't need the virtual machine or hypervisor. Instead, Docker daemon will interact directly with the host operating system. Now let's compare the virtual machines and the Docker container. Instead of waiting for a minute to boot up the virtual machine, you can just run the Docker container in few seconds. You also save resources and Docker container because in virtual machines, each guest operating system will have its own RAM and CPU. But in case of Docker container, it will only get the resources which are application needs to run. So that's all from the Docker container and virtual machines. Now let's explore the Docker image, Docker files, and Docker containers in the next lesson. 7. Docker Files Images and Containers: In this lesson, we'll talk about the Docker files, docker images, and we will again discuss Docker containers. So what is a Docker file? To answer this question, let me give you an example. Suppose you want to make a coffee, and for this purpose, you need fewer things like sugar, coffee, beans, milk, water, and cocoa powder. So you simply write down all the necessary material on a piece of paper. And then you go to the market to bring all these things at the market, yield purchase these things, and then put in the basket. Then you bring this basket to your home. You will separate all the items to make a coffee. Once you'll make a coffee, then you'll pull it inside a cup. Now let me tell you what is Docker file, docker image, and Docker container. The piece of paper which you have written, items which you need to make a coffee, it the Docker file. The items you have purchased put inside the basket is the Docker image, the coffee which you have poured into a Docker container. In Docker file, we simply write instructions like what kind of packages our application needs in order to run. The Docker image is a self-contained package that contains all the code, libraries and packages. And the Docker container is running form of Docker image. You can take a Docker image as Google Play Store application file and Docker container, the running application. Okay, so that's all for this lesson. Now I'll see you in the next one. 8. Installation Module Overview: In this section, we need to configure the darker insoluble machine. So first we'll discuss what is Docker Hub. Then we'll create a Docker account which is free of cost. And right after that, we'll install the Docker inside our machine. Once we've done that, a solution part, then we'll run a simple hello-world image inside of a machine. And we will also see what's the difference between darker pool and docker run. So these are the things which we'll cover in this section. I'll see you in the next lesson. 9. Docker Hub: In this lesson, we'll talk about the Docker Hub. So what is Docker Hub? Docker Hub is a hosted repository service provided by Docker for finding and shared container images with your team. If you have worked with a GitHub repository. On GitHub, we basically share our source code with others. Just like that. On Docker, we have a Docker Hub. And inside Docker Hub, we have repositories for sharing container images. When you write the code for our web application or any software, then your client or quality tester wants to test your software on his machine. As I already said, deploying the code to the client machine often results in errors and bugs. So you will first make a Docker image of your web application or software. And then you'll put that Docker image to Docker Hub, which is an online Docker repository. And later, when your client wants to test the application or software on his machine, you'll simply share your Docker Hub repository link with your client. And he can simply pull the image and run it inside his machine. Okay, So remember that term, Docker Hub, because later when we will go into the practical section, then we'll also push ever go to Docker Hub repository. Alright, that's all for this lesson. Now, I'll see you in the next one. 10. Install Docker Inside Windows Machine: In this section, we're going to install the Docker inside of the machine. So let's quickly go to the website hub.docker.com. And I'm going to create an account without setting up an account is very easy. I just need to provide few details. And then here we go. Our Docker account has been created. Now you'll see this option, download docker for desktop, download the desktop application for Windows. And our dollars will start. Now just wait for a moment to finish this download. Okay, I'll download has been completed. Now I'm going to run this installation file as an administrator. And soon our installation will start. Okay, wait for a moment to finish this installation. Installation will complete. Then you need to close this and restart with Windows to finish the installation. So I'll stop the recording and we'll restart my windows. Now, once these start, then we will see this pop-up dialog which says WSL, do a solution is incomplete. So as you can see that it says that click this link to follow the instructions to install the kernel update. And then we have to distort it. After installing the Linux kernel. I'm gonna go ahead and follow the instructions. Right now. I'm going to click on this W SL2 Linux kernel update package for x 64 bit machine. And I'm going to download this MSI file. Now click on that and install this package. Our solution has been finished, and now I'm going to restart my computer again. Here. I have restarted my computer. And this time, if we run the Docker, then we will see this tutorial screen. Just skip this. And here we'll see the Docker Desktop dashboard. I'll get our Docker installation has been completed. Now, I'll see you in the next lesson. 11. Docker Hello World: Earlier, we've installed Docker inside the Windows machine. Now let's create a command prompt and run as admin. Alright. Then I'm going to use this command Docker dash v. Now at least tends for darker version. If we hit Enter, then we'll get a darker version, which we're running on our machine. Okay, let's check if everything is okay or not. So we'll use the Docker and then we'll do sub-commands, run and provide a name of the image, which is Hello World. Now, if we hit Enter, then it says unable to find the image locally. So it will reach out to the Internet, downloaded the image, and then run it. Right after that, will get this message, Hello from the darker. And this message shows that your installation appears to be working perfectly. Now from where this Docker hello-world comes from. Let's put the Docker hub. There, will search for this image, hello void. And this Hello World is basically an official Docker image. And as you can see that Docker will tell us this, use this command. And if your solution is okay, then you will get this helloworld message. Alright, that's all for this lesson. Now, I'll see you in the next one. 12. Docker Pull Vs Run: In the last lesson, we have learned a **** of a Docker image. But if you'll go to the Docker website and you'll see this command, docker pull, hello volt. We've used the docker run command instead of Docker pull. Now what's the difference between Docker pool and Docker n? First of all, let's open the Docker Desktop. Inside the image, we have our HelloWorld image. Let's try to delete this image. As soon as we will delete this, will get this error message. And that's because this image is present inside a container. So to remove the image, we have to delete the container first. Okay, let's go to the container. And I'm going to delete this container. Right after that. Let's delete the image. Okay, now let's go to the command line or you can also use PowerShell. I'm gonna run the PowerShell. And then this time, let's use the command docker, pull HelloWorld and hit Enter. And soon it will extract the Docker hello-world image from the Internet. Okay, now as you can see, we have used a command, Pool hello void, and it will download the image. You can see the image in the Docker desktop image section. But right now we don't have a container. So in order to run the image in that container, we need to use the command docker run. And then the name of the image which is hello void. Alright, here we go. Our image is running inside a container. And right now we have a container in the Docker Desktop. If you will use the docker run hello-world, then Docker will first download the image and then run it. And if you use the docker pull Helloworld, then Docker will just download the hello-world image. And later you have to run the image with docker run command. Okay, So that's all from this lesson. Now, I'll see you in the next section. 13. Create Net Core Project: In this lesson, we're going to create an ASP.net Core application project inside the wheel Studio. The first thing that I'm going to do is just open the video studio and then create a new project. Then we'll go to this ASP.net Core web project template. And click Next. Here. We need to provide the name to our project. And we also need to choose the location where we want to save the project. Alright? Then just to add this project will receive this dialog window. We need to choose the target framework at the time of recording this course. Doctrine five is the latest stable version of dotnet. So I'll choose the Datsun five as a dark wood framework. And then we can add the darker spot by just checking this unable darker spot option. But I'll add the darker spot after creating the project. So I'll simply uncheck this option. And don't forget to uncheck this HTTPS option. At this moment, we are not interested to use the SSL certificate inside of a web application. So we'll just ignore that HTTPS option. Okay, Then let's create this project. Right now. We'll studio is busy and making a project for us. Alright, here we go. Our project has been created. Now, let's turn this project inside the web browser to see if everything is okay or not. We will get a default document core sample website inside of our web browser. Okay, everything is working perfectly. Now let's continue our work in the next lesson. 14. Add Docker Support: In this lesson, we're going to enable the darker spot inside the doctrine core project. So as I said earlier, there are two ways to add the darker spot inside the dark and core project. The first is to add the darker spot when you will create the project. And the second is to add a darker spot after the project has been created. We have created our project. And so far we have no Docker support inside this project. Because at the start of this project, we have uncheck the unable darker spot option. Now we're using the second approach to enable the Docker support. Okay enough talk. Let's right-click on the project and click Add Docker support. Now, we'll get a pop-up dialog which says what operating system you want to target. We have two options, Windows or Linux operating system. As you know, we're targeting Windows. So let's select this and hit Okay. Then you'll see a Docker file inside your project. This open, this Docker file inside the villus Studio. This is the file which will studio has generated. And this Docker file is a text document that contains all the commands or user could call on the command line to assemble an image. You don't need to learn these commands which were mentioned in this text file. Because we will Studio will take care of everything. Okay, so far in this lesson, we have created a Docker support inside our project. Now let's continue our work in the next lesson. 15. Build Docker Image: In this lesson, we're going to build a Docker image for our application. To build the image, we will switch to the PowerShell command line tool, but you have to provide the directory pot. So instead of using this approach, I'll go to the studio and their right-click on the docker file and choose Open containing folder. Okay, now here we'll go to the file and pick open Windows PowerShell. Alright, here we're going to build the image for our application. To build the image, Docker has introduced the following command. Docker, build, dash D, Docker Hub ID slash, and then your project name, space dot docker build command is used to build the image. D represents tagging. It means we want to tag or named our image. And right after that, we'll add the Docker Hub Pi D, which is our Docker Hub username. You can find it after login to your Docker Hub account. Okay, then we'll add the name of the project which we want to build. Right after that, we'll use the dot symbol. This dot symbol means current directory where we want to build a Docker image. Okay, Let's hit Enter. And our bill starts. And soon we'll get the error message which says file not found in the build context. Okay, so to solve this error, we have to go to this Docker file. There. Let's cut this file and paste it one step backward. Alright, now once again we will go to the PowerShell. And this time we'll use the command docker build dusty, your Docker Hub ID, slash your project name, space dot. And then let's hit Enter or Bill starts. And let's see what kind of errors will get this time. Okay, cool. This time we're getting the NuGet package error because during the build, Internet is required for Docker engine. And I know you are connected with the internet, but your Docker Engine is unable to find the image because there's some DNS connectivity issue. So how to solve this issue? Well, it's quite simple. You just need to copy this DNS and then go to the Docker Hub dashboard sitting in the Docker Engine. Let's paste this code. Right after that. Click on Apply and restart. This may take some time. So be vicious. Using this approach. Next time you will never face any kind of connectivity on NuGet package issues. Okay, once again, we'll use the PowerShell and this time we'll build a Docker image. Again. Let me clear this mess so that you don't get confused. Alright, now let's use the docker build dash T, your Docker Hub ID slash your project name, space dot, and then hit Enter. This is going to build a Docker image. Now, wait for few seconds to get the result. And a Docker image has been created. Alright, let's continue over in the next lesson. 16. Check Docker Image: In the last lesson, we have created our build a Docker image for a doctrine Core web application. So this time we'll check whether the image is available inside of a Docker Engine or not. To check the image, let's use the command docker than right images. And by using this command will get all the Docker images which are present inside of a Docker engine. Okay, Let's hit Enter. And here we go. This is the image which we have created recently. If we go to the Docker Desktop, then maybe you will not see the image here. Don't worry, because we have checked via PowerShell, an image exists. Sometimes this requires a restart of Docker Desktop and then you'll see your Docker image here. Alright, now in the next lesson, we'll run this image in the docker container. So I'll catch you in the next lesson. 17. Run Docker Container: In this lesson, we're going to run our application docker image inside the container. To run the images inside a container, we need to use the following Docker command, which is darker. And then we'll add the dash B, which represents the port number. And we'll add any random port number where we want to run our image. If you'll go to the studio and run your projects inside the IIS Express. Then inside the web browser, you'll see that our web application is running on this port. Well, Same is the case with the Docker image. To run the Docker image inside that container will need some port number. You can provide here, any random port number. And right after that, just provide the port number which was used to build a Docker image. And that is port number 80. I know you are thinking that from where we can find this port number. Well, if you could live close to you and open the Docker file, then you'll see the port number inside the Docker file. But the problem here is we don't have a Docker file inside and we'll studio because we have moved our Docker file one step backward. So let's go to the folder where we have put the Docker file and then just open this file in some text editor. Alright, is you'll see the port number 80, which was exposed when we created the image. Okay, so you can find a port by just opening the Docker file. Then we'll add the Docker Hub ID for the project name. So this command will run the Docker image inside the Docker container. Alright, now, in the next lesson, we'll do a practical implementation of Docker container. Alright, I'll see you in the next lesson. 18. Run Docker Container Implementation: In this lesson, we're going to run the Docker image inside a Docker container. In the last lesson, I've told you about this Docker command for running the Docker image inside the Docker container. This time, we'll do a practical implementation of this approach. Just to see the PowerShell where we had left off our verte. Here. If you add the docker images command, then she'll see all the images which are available inside our machine. We can run this image locally inside our machine without using the wheel studio. Alright, so we have to use the following command to run the image locally that is darker. And then we'll add the dash B, which represents the port number. And we'll add any random port number where we want to run every image. Right after that. Just provide the port number which was used to build a Docker image. And that is both number eight or 80. Then provide this repository name, which is your Docker Hub ID and your project name. Okay, Now let's hit Enter and wait to see the magic. Soon you'll see the following kind of message, which says, now listening on HTTP. Also to stop the application will use the Control plus C. Don't press Control plus C right now because we're going to check whether our application is running without real studio or not. So we'll simply hand over to any web browser. And there we will write http localhost. And then we'll add the port number, which we have used to run the container. If we go to the PowerShell, then you'll see the port number which we have used to run this image. Just use the same port number here. And let's hit Enter. Okay, you'll see the web application inside the web browser. And the cool thing is that it's running inside the Docker container. Now, our application does not require view studio and all the dependencies because it's running without video. Let me show you how it looks like when we'll run this application. We'll studio. So let's go to the veal studio. And they are less than this application on IIS Express. And soon our web browser will be open. And there you'll see the web application running on this port number. Now let's compare this port number with that Docker container port number in which application is running. Notice these two ports are different. Okay, Now let's copy the wheel Studio project port number. And right after that, Let's stop the execution. During this will also close the web browser in which we'll Studio web project was running. Our application has been stopped. Now, if we will open the same web browser in which we are running the studio where project and paste the URL which we had copied and hit Enter, then you'll get the error. And no application was found on this port number. Now, if we copy the Docker container port number with a URL and paste it inside the web browser and hit Enter. You'll notice that our application is running. So that's all we can run. Our application where Docker container. Alright, that's all for this lesson. Now, I'll see you in the next one. 19. Deployment Module Overview: In this module, we'll call it the Docker Deployment. And for this purpose, we'll cover two things. First, we'll discuss how to push the Docker image to the Docker Hub. Once will push the Docker image, then we'll dive into the Azure Container and there will deploy our Docker image. Okay, let's try to cover these things in the next lesson. 20. Push Docker Image: Earlier we have built a Docker image for web application, and we have also run the application via Docker container. Now in this lesson, we're going to push the Docker image to the Docker Hub. I know a question came into your mind that why we need to push the Docker image to the Docker Hub. Let's say you have created a Docker image for dotting Core web application. And now your quality tester wants to test this application. So he will desktop web application which is running on your machine. Well, obviously you'll push the Docker image to Docker Hub and shade the Docker Hub image link with your teammate or quality tester. And from the Docker Hub, he will pull the image and run it inside his machine. It doesn't mean he can simply take a pool and run this image inside the machine. First hinted to set up the darker inside his machine. And then you can take the poll from the Docker Hub and run the image. To push the Docker image to Docker Hub will need the following commands. Docker push, and then the name of the repository, which in our case, is there a project name. And this command will push a Docker image to Docker Hub. Let's try to push the Docker image in the next lesson. 21. Push Docker Image To Docker Hub: In this lesson, we'll get to push the Docker image to the Docker Hub. So without wasting any time, we'll go to the PowerShell and they're looking to write a command to push the Docker image to the Docker Hub. To push the Docker image, we'll use the following command, which is docker push. And then the name of the repository, which is obviously your Docker Hub ID and the project name. Before invoking this, Come on. Let's go to the Docker Desktop dashboard. Make sure your sign-in with your Docker Hub ID and password. Okay, Let's go back to the PowerShell. Let's hit Enter and wait for a minute or two because this push command will push our Docker image to the Docker Hub. During this push command. Make sure you are connected with the Internet. During this process, let me go to my Docker Hub account and their repositories. You can see that I don't have any repositories yet. But once will push the Docker image, then you'll see the repository here. Till then, we need to wait for few seconds. Here we go. How Docker image has been pushed to the Docker Hub. Let's go to the Docker Hub and let's refresh it. You'll see the Docker image here forever. Vet application. Alright, so far in this lesson we have learned how to push the Docker image to Docker Hub. Now, in the next lesson, we'll deploy this Docker image to the Microsoft Azure. I'll see you in the next lesson. 22. Deploy Docker Image: In this lesson, we're going to deploy the Docker image of doctrine called web application to Microsoft Azure. So first of all, make sure you have Microsoft Azure account. After creating the Microsoft Azure account, go to portal.azure.com. Let's click this, Create a Resource option. Now in the search bar leaking to search Container Instances and choose this. Alright, then let's get our container. We need to provide few details like resource group. Resource group is a logical container into which Azure resources like web applications and databases are stored and managed. Just thinking about this resource group as a folder. Okay, then give any user friendly name to your container. I'm going to provide the following name. Then we need to choose the source of the image. If you hover your mouse cursor on this, then it will tell you that it's the source from vista container image is bold. We have pushed the Docker image to Docker Hub. So this time we will provide a source of Docker Hub image. Okay, let's select this Docker Hub or other registry. And then says to your Docker Hub, There's you'll see your repository. Just copy this. And right after that, let's move to the Azure portal and we're going to paste the repository name. Now, pick the OS type. I'll use a Windows OS. And right after that, we'll select this networking tab. And in the DNS level section, just provide the name. This DNS name is like your website name. Once we'll deploy the Docker image to the Azure, then we will use the following URL to access our application. Alright, just add some user-friendly name here. Then click on Review plus Create. And soon you will see the validation passed message. Now let's go and click on this option. It's going to deploy the image inside the Azure Container Instance. Currently, our deployment is in progress and it will take some time this week till the deployment will complete. Our deployment has been successful. And we'll get this notification. Now go to the source and you'll see this FQDN, this copy this, and place it inside another tab and hit enter. With this URL, you can access your web application. Alright, here we go. We can use our application and we have successfully deployed the application image to the Azure Container. Alright, That's pretty awesome. So far in this section, we have learned how to push the image to Docker Hub. And then we have also learned how to deploy the Docker Hub image to the Azure Container Instance. That's all from this module. Now I'll see you in the next lesson. 23. Pull Image Module Overview: In this module, we're going to learn how we can pull the Docker image from the Docker Hub repository. So for this purpose, first, we'll set up another machine with Windows and Docker desktop. Then we'll pull our web application docker image from the Docker Hub. And finally, we'll run the image inside a container. So these are things which we'll cover in this section. Alright, let's get started. 24. Pull Docker Image: In this lesson, we're going to learn how to use the pull command to pull the Docker image from the Docker Hub. Let me tell you that we will use the following command to pull the image. And that is docker pull. And then we'll add the name of the Docker Hub repository. This command will download R, pull the image from the Docker Hub to your local machine. Okay, so let me switch to another machine. And there first of all, we need to set up the Docker Desktop. I have already told you how to install the Docker desktop. Again, we're going to install the Docker insight into their machine. Currently this machine doesn't contain darker. So first of all, let's install the Docker. I'm going to pause the video to save your time because I have also covered the Docker installation at the start of this course. I have successfully installed Docker inside my machine. Now let's open the Docker Desktop. It's running. So we will then move towards the PowerShell. I'm going to use the pull command to pull the image from the Docker Hub repository. So let's use the command docker pull. And then we'll add the repository name, which we'll get from our Docker Hub. Okay, Let's hit Enter. And this will download and extract the Docker image from the Docker Hub. Just wait for a minute because this is going to download the image. Okay, here we go. Our image has been downloaded. The check whether it's downloaded or not, we'll use the command docker images and hit Enter. And you'll see the image here. Okay, now, in the next lesson, we'll run this image inside our machine. Alright, see you in the next lesson. 25. Run Docker Image Inside The Container: In the last lesson, we have pulled the image from the Docker Hub. And now we're going to run this image inside the Docker container. So as we discussed earlier, to run the image, we need a Foley command, which is docker run. And then we'll add dash B, which represents the port number. And we'll add any random port number where we want to run our image. Right after that will provide the port number which was used to build a Docker image. Alright, then we'll add Docker Hub id with the project name. Or in short, we'll add the repository name. Let's go to the PowerShell. We'll use the command which is docker, run dash p. And then we'll add any random board number here where we want to run our container. And on displays, we'll add the port number, which was used to build a Docker image. And right after that, let's add the repository name and hit Enter. Soon, you will see this message for listening on this port. Alright, let's open the web browser. And they will write localhost. And then we'll add the port number in which we want to run our container. Alright, let's hit Enter. And here we go. We'll see the dot and Core web application, which is running inside another machine. Alright, that's all from this lesson. Now, I'll see you in the next one.