Docker fails in Visual Studio 2017, how do i get docker to run in VS2017

I have installed Docker and turned on Virtualization in the system bios.
When I go to build a docker container of my .NET Core proj, it fails with this error:

“The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.”

  • Is it possible to change the IP of docker container when it is running?
  • nginx reverse proxy folder 403 error
  • Docker file permission php on Mac OS with docker-compose && dockerfile
  • Restarting machines in a docker swarm on AWS
  • How to compile from a remote machine ?
  • Error running commands with Dockerfile
    • ALSO NOTE:
      The Docker Icon in the Docker System Tray does not appear and I am also getting this error as well: time=”2017-04-13T21:23:11-05:00″ level=info msg=“Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows”

    Full error here with some JSON filter issue as well:

    Error MSB4018 The “PrepareForBuild” task failed unexpectedly.
    Microsoft.DotNet.Docker.CommandLineClientException: error during connect: Get htp://%2F%2F.%2Fpipe%2Fdocker_engine/v1.27/containers/json?filters=%7B%22name%22%3A%7B%22dockercompose512535401_webapplication1_%22%3Atrue%7D%2C%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=1: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running..

    For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting —> Microsoft.DotNet.Docker.CommandLineClientException: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.27/containers/json?filters=%7B%22name%22%3A%7B%22dockercompose512535401_webapplication1_%22%3Atrue%7D%2C%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=1: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DotNet.Docker.DockerClient.d__0.MoveNext()
    — End of inner exception stack trace —
    at Microsoft.DotNet.Docker.DockerClient.d__0.MoveNext()
    — End of stack trace from previous location where exception was thrown —
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DotNet.Docker.DockerWorkspace.d__13.MoveNext()
    — End of stack trace from previous location where exception was thrown —
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 153

  • Yarn fails running on Dockerfile
  • How to connect Docker Machine to a remote Docker VirtualBox
  • Docker container IO performance
  • Docker (compose) fails to build container when mounting single file from official Wordpress image
  • Zero downtime/blue-green deployment of Single Page Application (SPA)
  • --cap-add in Google Container Engine
  • 2 Solutions collect form web for “Docker fails in Visual Studio 2017, how do i get docker to run in VS2017”

    This looks like you have used Docker Toolbox, Toolbox requires an additional step to work properly. You should try running this:

    (assuming the default machine exists)

    docker-machine env default

    At the end of that command there will be a note of a command that you have to run depending on the shell environment. For cmd it will look like @for … And for powershell it will look like an invoke-expression …

    Make sure you run that command, this is very important! Then test the Docker daemon using this:

    docker info

    As a side note those warning about the keyring are not really important, this is just because you are running on Windows and it will have no negative effect.

    Hope this helps!

    I had this same issue, removing the edge version of docker and installing the stable version resolved it for me.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.