Reputation: 2593
I am checking the documentation here about deploying Windows container (in preview) in Azure Web App for containers.
Also it appears that the document is lagging behind (as appears to be evolving fast and this is in preview). E.g. In the steps 5 of the Windows container deployment the instructions does not talk about the startup file as shown below. No documentation if this is even mandatory or can be kept empty?
I am seeing error on this pannel at the bottom while trying to deploy the container from image hosted in public repo of Docker Hub.
How to fix the error I am getting?
The error message is: Cannot run this Operating System/Version in Windows Containers. Maximum supported OS version is 10.0.14393.9999.
Here is my docker.yml which I added from VS 2017 by adding "container orchestration support".
FROM microsoft/aspnet:4.7.2-windowsservercore-1803
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .
And here is the docker-compose.yml
version: '3.4'
services:
webformapp:
image: ${DOCKER_REGISTRY-}webformapp
build:
context: .\WebFormApp
dockerfile: Dockerfile
Upvotes: 1
Views: 886
Reputation: 464
Currently we only support Windows Server 2016 RS1 images but we are rolling out an update in which we will be able to run all Windows container base images from RS1 to RS5. I don't have an exact date but we should be done by the end of the March.
For now, please change your base image to: microsoft/aspnet:4.7.2-windowsservercore-ltsc2016
Once we finish the update, please try: microsoft/aspnet:4.7.2-windowsservercore-ltsc2019
ltsc2019 is smaller,so you will notice that the web app will be starting quicker
For more info: https://hub.docker.com/_/microsoft-dotnet-framework-aspnet
Thanks,
Joaquín
Upvotes: 1
Reputation: 846
Disclaimer: Answer is not specific to Azure Web App, so treat with caution.
However, I've had a fair few dealings with the problems around hosting windows containers. It looks very similar to an issue I've had before - basically, the virtualisation layer between Docker and Windows is very thin, so the windows version between the host and container need to be aligned.
You either need to match up the Container version with the Windows version (i.e. build from a different base image), or use hyper-v virtualisation mode within docker run to handle the difference. Not sure if the second is even possible within Azure Web Apps.
See here for more details:
Upvotes: 0
Reputation: 72151
You are using 1803 as a base OS version for the container, however the error mentions 10.0.14393.9999
, which corresponds to 1607 (https://en.wikipedia.org/wiki/Windows_10_version_history). So you need to use another base image. Try this base: 4.7.2-windowsservercore-ltsc2016
Upvotes: 0