Error building a docker in Windows 10

I’m trying to build a docker image from a really simple project, just to start understanding how docker works and communicate. So, I have created a WebApi project, with just one method that returns a 200.

Once the project has been created, I created the dockerfile:

  • Dockerfile: Setup SSH key for Bitbucket
  • How to stop running node in docker
  • Boot2Docker Image (Ubuntu) Download Very Slow on Windows 8.1
  • How to assign IPv6 address with docker-compose
  • Docker compose-build with rake assets:precompile
  • Postgresql drivers not found when dockerizing TeamCity
  • # TP5 for technology preview (will not be needed when we go GA)
    # FROM microsoft/iis
    FROM microsoft/iis:TP5
    MAINTAINER Roman_Hervas
    # Install Chocolatey (tools to automate commandline compiling)
    ENV chocolateyUseWindowsCompression='false'
    RUN @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((New-Object System.Net.WebClient).DownloadString(''))) >$null 2>&1" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    # Install build tools
    RUN powershell add-windowsfeature web-asp-net45 \
    && choco install microsoft-build-tools -y --allow-empty-checksums -version 14.0.23107.10 \
    && choco install dotnet4.6-targetpack --allow-empty-checksums -y \
    && choco install nuget.commandline --allow-empty-checksums -y \
    && nuget install MSBuild.Microsoft.VisualStudio.Web.targets -Version \
    && nuget install WebConfigTransformRunner -Version
    RUN powershell remove-item C:\inetpub\wwwroot\iisstart.*
    # Copy files (temporary work folder)
    RUN md c:\build
    WORKDIR c:/build
    COPY . c:/build
    # Restore packages, build, copy
    RUN nuget restore \
    && "c:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" /p:Platform="Any CPU" /p:VisualStudioVersion=12.0 /p:VSToolsPath=c:\MSBuild.Microsoft.VisualStudio.Web.targets.\tools\VSToolsPath WebApiDocker.sln \
    && xcopy c:\build\WebApiDocker\* c:\inetpub\wwwroot /s
    # NOT NEEDED ANYMORE –> ENTRYPOINT powershell .\InitializeContainer

    And the InitializeContainer:

    If (Test-Path Env:\ASPNET_ENVIRONMENT)
        \WebConfigTransformRunner.\Tools\WebConfigTransformRunner.exe \inetpub\wwwroot\Web.config "\inetpub\wwwroot\Web.$env:ASPNET_ENVIRONMENT.config" \inetpub\wwwroot\Web.config
    # prevent container from exiting

    So, finally, I try to execute the command to build the project: docker build -t dockerexample .

    The result is a failure with the following message (step 4):

    Step 1/10 : FROM microsoft/iis:TP5 
    ---> accd044753c1
    Step 2/10 : MAINTAINER Roman_Hervas
     ---> Using cache
     ---> e42af9c57e0d
    Step 3/10 : ENV chocolateyUseWindowsCompression 'false'
     ---> Using cache
     ---> 24621a9f18d9
    Step 4/10 : RUN @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((New-Object System.Net.WebClient).D
    ownloadString(''))) >$null 2>&1" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
     ---> Running in 61199189917a
    container 61199189917a0057fb54dddca6d80a6c6f9e8b77d2326379537684f58fefbe50 encountered an error during CreateContainer:
    failure in a Windows system call: A connection could not be established with the Virtual Machine hosting the Container.
    (0xc0370108) extra info: {"SystemType":"Container","Name":"61199189917a0057fb54dddca6d80a6c6f9e8b77d2326379537684f58fefb

    I’m totally noob with Docker, so I have no idea of the problem here, and Google has not been too much helpful. My operating system is Windows 10 Pro, and Docker version is 17.03.1-ce-win12 (12058).

    Why is it launching an error in step 4?

    Thank you very much in advance.

  • Phoenix Framework - docker image for development and deployment to Kubernetes
  • Running Docker in PyCharm using Windows and virtualenv (Tensorflow)
  • Change CPU capacity of Docker containers
  • How can I run containers detached and have them automatically removed when they exit?
  • Could not get page inside of the docker's container
  • Docker volume plugin marathon
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.