How To Install ASP.NET Core Docker For Windows

In this post, we are going to see how we can install ASP.NET Core Docker in our Windows. Before we start, it would be useful if we say something about Docker, right? Docker is a container software platform, where a container is everything on which we need to make our software run. The container is lightweight. You can read more about Docker here. I hope you will like this. Now, let’s begin.

Background

Today, I was just trying to create a ASP.NET Docker Application in Visual Studio 2017. Unfortunately, I was getting an error as follows.

I learned that I had not installed Docker in my machine yet, so I decided to do this.

Installing Docker for Windows

You can install Docker, Once you downloaded the set up file, please run the file.

Start and test the Docker

Once you install the Docker, now it is time to test whether everything is installed correctly or not. Prior to it, make sure that the Docker is starting.

Docker-is-Starting

There is a hight possibility you will get the error ”Hardware assisted virtualization and data execution protection must be enabled in the BIOS” as the preceeding image.

Docker-Error-768x282

Before you go and change the settings in BIOS, check in Task Manager Window as well.

Enabling Virtualization in BIOS

To enable the virtualization in BIOS, go to System Configuration -> Click Virtulization Technology and enable it.

BIOS-Settings-768x430

After the restart, the Docker will ask you to start the Service. Go ahead.

Setting up Docker

Docker-Service-Is-Not-Runnig-Window-768x282

Now again, if you are getting an error as “Error MSB4018 The “PrepareForLaunch” task failed unexpectedly.

you need to change your shared drive settings in Docker.

Right click and click on the settings.

Docker-Settings

Click Shared Drives and select the drive, which hosts your project and the drive, where %USERPROFILE% resides.

Shared-Drive-in-Docker-768x500

Click Apply and type your filesystem password in the popup given below. Now, if you are running the Edge version of Docker Community Edition for Windows, after the install; you may be able to login with your Docker ID and the password.

Docker-SignIn-page

We have enough settings for now. Shall we just check whether the installation is done perfectly or not? To check, go to the command Window and type the command as: docker run hello-world.

Docker-Check-From-Command-Window

Docker Check from Command Window

You can also check the Docker version with the command docker –version.

Conclusion

Did I miss anything that you may think is needed? Did you find this post useful? I hope you liked this article. Please share your valuable suggestions and feedback with me.