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:

  • Monitoring a log file for systemd service startup
  • Sorl4 failing to index when using EBS volume in ECS
  • Where should live docker volumes on the host?
  • Mounting container volume from the hosts' drive?
  • How long will kube-controller-manager migrate one pod from a shutdown node to another health node
  • Difference between Rancher and other container orchestration
  • # 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.

  • Docker dependency issue: Rake aborted! LoadError: cannot load such file — sqlite3/sqlite3_native
  • docker pull behind shadowsocks proxy
  • Centos docker container crashes with 6 Segmentation fault - where's the core dump
  • Configuring application in docker container to access other containers
  • Profiling Java application in kubernetes
  • How could I launch multiple container at a time shared one Dockerfile
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.