dotnet-docker icon indicating copy to clipboard operation
dotnet-docker copied to clipboard

Document why `DOTNET_RUNNING_IN_CONTAINER` is needed

Open richlander opened this issue 3 years ago • 1 comments

This ENV is set in various runtime-deps and runtime images, and in various samples. It would be good to document why it is needed and which parts of the codebase honor that feature. That would help folks creating fully custom container deployments (not using our assets) to understand why setting this ENV does or does not matter.

https://github.com/dotnet/dotnet-docker/blob/7cf01d82858fcc3824574fb92580c4151954699a/src/runtime-deps/6.0/jammy/amd64/Dockerfile#L21

richlander avatar Aug 15 '22 21:08 richlander

It would be interesting if we can deploy a .net application within a docker container without this flag and without the runtime image! Now that the runtime can be installed on Ubuntu with simple 'apt install dotnet6', could a dotnet app in a docker container re use the runtime on the OS instead of within the container? It could bring some advantages to reduce image sizes on fully controlled OS output with multiple container deployment, e.g. on IOT market.

ericbl avatar Nov 01 '22 14:11 ericbl