Skip to content
Repro for using --read-only flag in Docker with ASP.NET Core
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
Dockerfile
LICENSE
Program.cs
ReadMe.md
ReadOnlyTest.csproj
Startup.cs

ReadMe.md

  1. Build the image:
docker build -t read-only-test .
  1. Run without COMPlus_EnableDiagnostics=0 with a read-only file system:
docker run --rm --read-only -it -p 8000:80 read-only-test

This outputs the following if read-only file systems are not supported:

Failed to initialize CoreCLR, HRESULT: 0x80004005

  1. Run with COMPlus_EnableDiagnostics=0 with a read-only file system.
docker run --rm --read-only -it -p 8000:80 -e COMPlus_EnableDiagnostics=0 read-only-test

The app now starts!

You can’t perform that action at this time.