microsoft / iis-docker

Dockerfile for IIS
https://hub.docker.com/r/microsoft/iis/
MIT License
288 stars 128 forks source link

Unable to spin up iis:windowsservercore-ltsc2016 container #94

Closed apwestgarth closed 6 years ago

apwestgarth commented 6 years ago

Trying to build a .Net Framework application into a container using VS2017 and docker for windows. Each time I attempt to build the docker container I get the following error:

========== Preparing Containers ========== Getting Docker containers ready... docker-compose -f "C:\dev\github\eShopModernizing\eShopLegacyWebFormsSolution\docker-compose.yml" -f "C:\dev\github\eShopModernizing\eShopLegacyWebFormsSolution\docker-compose.override.yml" -f "C:\dev\github\eShopModernizing\eShopLegacyWebFormsSolution\obj\Docker\docker-compose.vs.debug.g.yml" -p dockercompose1159839811862177339 --no-ansi build Building eshoplegacywebforms Step 1/1 : FROM microsoft/iis:windowsservercore-ltsc2016 ---> 6d91070fab75 Successfully built 6d91070fab75 Successfully tagged eshoplegacywebforms:dev docker-compose -f "C:\dev\github\eShopModernizing\eShopLegacyWebFormsSolution\docker-compose.yml" -f "C:\dev\github\eShopModernizing\eShopLegacyWebFormsSolution\docker-compose.override.yml" -f "C:\dev\github\eShopModernizing\eShopLegacyWebFormsSolution\obj\Docker\docker-compose.vs.debug.g.yml" -p dockercompose1159839811862177339 --no-ansi up -d --no-build --force-recreate --remove-orphans Removing dockercompose1159839811862177339_eshoplegacywebforms_1 Recreating 2856529f5e33_2856529f5e33_2856529f5e33_dockercompose1159839811862177339_eshoplegacywebforms_1 ... Recreating 2856529f5e33_2856529f5e33_2856529f5e33_dockercompose1159839811862177339_eshoplegacywebforms_1 ... error ERROR: for 2856529f5e33_2856529f5e33_2856529f5e33_dockercompose1159839811862177339_eshoplegacywebforms_1 Cannot start service eshoplegacywebforms: container be9f8b83003e194ac14006789a2395427d9f4d8ed1cf5b473356a05632509670 encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106) ERROR: for eshoplegacywebforms Cannot start service eshoplegacywebforms: container be9f8b83003e194ac14006789a2395427d9f4d8ed1cf5b473356a05632509670 encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106) Encountered errors while bringing up the project. A non-critical error occurred while getting containers ready. Your project will continue to function normally. The error was: Removing dockercompose1159839811862177339_eshoplegacywebforms_1 Recreating 2856529f5e33_2856529f5e33_2856529f5e33_dockercompose1159839811862177339_eshoplegacywebforms_1 ... Recreating 2856529f5e33_2856529f5e33_2856529f5e33_dockercompose1159839811862177339_eshoplegacywebforms_1 ... error ERROR: for 2856529f5e33_2856529f5e33_2856529f5e33_dockercompose1159839811862177339_eshoplegacywebforms_1 Cannot start service eshoplegacywebforms: container be9f8b83003e194ac14006789a2395427d9f4d8ed1cf5b473356a05632509670 encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106) ERROR: for eshoplegacywebforms Cannot start service eshoplegacywebforms: container be9f8b83003e194ac14006789a2395427d9f4d8ed1cf5b473356a05632509670 encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106) Encountered errors while bringing up the project..

I've kept my docker compose file very simple to try and debug:

FROM microsoft/iis:windowsservercore-ltsc2016

ARG source

#

RUN mkdir c:\site

#

RUN powershell -NoProfile -Command \

#Import-module IISAdministration; \
#New-IISSite -Name "Site" -PhysicalPath C:\site -BindingInformation "*:8000:"

#

EXPOSE 8000

s

WORKDIR /site

COPY ${source:-obj/Docker/publish} .

# #

If I change the source to one from the aspnet team - FROM microsoft/aspnet:4.7.1-windowsservercore-ltsc2016 the container comes up no issues.

mcy94w commented 6 years ago

Hi @apwestgarth : If you run microsoft/iis:windowsservercore-ltsc2016 directly with out using docker-compose, will the container start successfully?

mcy94w commented 6 years ago

I will close this issue as duplicate of this https://github.com/Microsoft/iis-docker/issues/93

apwestgarth commented 6 years ago

Hi, I don't agree it's the same issue. I can run the container via docker run

mcy94w commented 6 years ago

I see. @yanchenw any idea why this happens?

yanchenw commented 6 years ago

@apwestgarth

The compute system exited unexpectedly. (0xc0370106) This usually means the compute system crashed, you may have encountered an windows container bug.

Are you using a RS3 host? Can you switch to microsoft/iis:windowsservercore-1709 ?

apwestgarth commented 6 years ago

Same issue I'm afraid

yanchenw commented 6 years ago

@PatrickLang maybe able to help to see if this is a known windows container bug.

mcy94w commented 6 years ago

@PatrickLang Is it allowed to run RS1 argon container on RS3 Host?

PatrickLang commented 6 years ago

You can run Windows Server 2016 images on a Windows Server, version 1709 or Windows 10 1709 host. It requires --isolation=hyperv which is the default on Windows 10

mcy94w commented 6 years ago

running with --isolation=hyperv mean starts as xenon/hyper-v container right?

PatrickLang commented 6 years ago

yes. docker run --isolation=hyperv microsoft/iis:windowsservercore-ltsc2016