question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows Container nanoserver:1809 errors out with self-contained ASP.NET 5 app

See original GitHub issue

Steps to reproduce the issue

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]

nanoserver-1809-error

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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
MichaelSimonscommented, Sep 23, 2020

Re-opening, as this appears to be an issue that needs investigation. I would expect this to work.

1reaction
MichaelSimonscommented, Sep 22, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found