Click here to Skip to main content
13,828,661 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


5 bookmarked
Posted 7 May 2017
Licenced CPOL

Installing ASP.NET Core Docker For Windows

, 7 May 2017
Rate this:
Please Sign up or sign in to vote.
Installing ASP.NET Core Docker For Windows

Table of Contents


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


Today, I was just trying to create an ASP.NET Docker application in Visual Studio 2017. Unfortunately, I was getting an error as shown below:

Error MSB4018 The "PrepareForBuild" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Unable to run ‘docker-compose’. 
Verify that Docker for Windows is installed and running locally. 
For troubleshooting, please review —> 
System.ComponentModel.Win32Exception: The system cannot find the file specified

Then I came to know that I have not installed Docker on my machine yet, so I decided to do that.

ASP NET Core Docker Error

ASP NET Core Docker Error

Installing Docker For Windows

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

Docker For Windows

Docker for Windows

Start and Test the Docker

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

Docker is Starting

Docker is Starting

There is a high possibility that to get an error ”Hardware assisted virtualization and data execution protection must be enabled in the BIOS” as preceding image.

Docker Error

Docker Error

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

Hyper V support and Virtulization

Hyper V support and Virtualization

Enabling Virtulization in BIOS

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

BIOS Settings

BIOS Settings

After the restart, the Docker will ask you to start the service. Go ahead and do that.

Setting up Docker

Docker Service Is Not Runnig Window

Docker Service Is Not Running Window

Now again, if you are getting an error as “Error MSB4018 The “PrepareForLaunch” task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Creating network “dockercompose3875147227_default” with the default driver
Building linq_basic_to_advanced
Service ‘linq_basic_to_advanced’ failed to build: Get net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).”, you need to change your shared drive settings in Docker.

Right click and click on the settings.

Docker Settings

Docker Settings

Click on the Shared Drives and select the drive that hosts your project and the drive where %USERPROFILE% resides.

Shared Drive in Docker

Shared Drive in Docker

Click on Apply and type your filesystem password in the following pop up. 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 password.

Docker SignIn page

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.


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

Your Turn. What Do You Think?

A blog isn't a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you're better off posting it on C# Corner, Code Project, Stack Overflow, ASP.NET Forum instead of commenting here. Tweet or email me a link to your question there and I'll definitely try to help if I can.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sibeesh Passion
Software Developer
India India
Microsoft MVP (2016 - 2017, 2017 - 2018, 2018 - 2019), C# Corner MVP (2014, 2015, 2016, 2017), DZone MVB

See more here

You may also be interested in...

Comments and Discussions

QuestionI also would like to see the ASP.NET core part, thanks! Pin
Member 1207995925-Aug-17 4:22
memberMember 1207995925-Aug-17 4:22 
QuestionWhere is the ASP.NET Core part in this article? Pin
dkurok9-May-17 0:21
memberdkurok9-May-17 0:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06 | 2.8.190114.1 | Last Updated 7 May 2017
Article Copyright 2017 by Sibeesh Passion
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid