Windows Container nanoserver:1809 errors out with self-contained ASP.NET 5 app
See original GitHub issueSteps to reproduce the issue
- git clone aspnet5-window-container
> docker build -t paymentsapp .
> docker run -p 8080:80 paymentsapp
(API successfully runs on http://localhost:8080/api/health)- Now update Dockerfile and swap base image
nanoserver:2004
withnanoserver:1809
FROM mcr.microsoft.com/windows/nanoserver:2004 AS runtime //old
with
FROM mcr.microsoft.com/windows/nanoserver:1809 AS runtime ///new
> docker build -t paymentsapp .
> docker run -p 8080:80 paymentsapp
(API errors out)
Failed to map file. CreateFileMappingW(C:\app\PaymentsService.exe) failed with error 5
Failure processing application bundle.
Failed to map bundle file [C:\app\paymentsservice.runtimeconfig.json]
Expected behavior
- Self-contained ASP.NET 5 should work on
nanoserver:1809
base image
Actual behavior
- Self-contained ASP.NET 5 errors out on
nanoserver:1809
base image
Additional information
- Self-contained ASP.NET 5 works on
nanoserver:2004
base image
Output of docker version
Client: Docker Engine - Community
Azure integration 0.1.15
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:43:18 2020
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.24)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:57:30 2020
OS/Arch: windows/amd64
Experimental: false
Output of docker info
Client:
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.12
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 19041 (19041.1.amd64fre.vb_release.191206-1406)
Operating System: Windows 10 Pro Version 2004 (OS Build 19041.508)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 11.84GiB
Name: User-dev
ID: VKKG:XOWC:PWG5:P24F:YDDN:ZDM3:CLXR:NNRV:3BYY:IZKX:KLAY:PZRF
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: true
File Descriptors: -1
Goroutines: 61
System Time: 2020-09-22T09:47:20.0758564-04:00
EventsListeners: 2
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Original Thread: https://github.com/dotnet/dotnet-docker/issues/2257
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Azure App Service Window Container Fail to start (.Net ...
It was auto generated when I enable docker support for Windows FROM mcr.microsoft.com/dotnet/aspnet:3.1-nanoserver-1809 AS…
Read more >Recently Active 'nano-server' Questions
Background I have a .NET application that I would like to install inside a Nano Server Docker container, specifically build 1809. The app...
Read more >What are Windows containers? | Definition from TechTarget
A container is a logical environment created on a computer where an application can run. Containers and guest applications are abstracted from the...
Read more >Container does not start in Azure or deployment is ...
Cannot run the specified image as a Windows Containers Web App. App ... Containers up to Windows Server Core 2019 and Nanoserver 1809....
Read more >NET SDK by Microsoft
ASP.NET Core Docker Sample - This sample demonstrates using Docker with an ASP.NET Core Web App. Develop .NET Apps in a Container. The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Re-opening, as this appears to be an issue that needs investigation. I would expect this to work.
I was able to reproduce this issue. It appears related to using
PublishSingleFile=true
. If you remove the flag, the resulting image works as expected.