Skip to content

Consistent environment variable names for DOTNET_RUNNING_IN_CONTAINER #677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fbeltrao opened this issue Aug 27, 2018 · 1 comment
Closed

Comments

@fbeltrao
Copy link

fbeltrao commented Aug 27, 2018

Steps to reproduce the issue

  1. Build .NET Core application based on microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1709
  2. Build .NET Core application based on microsoft/dotnet:2.1-aspnetcore-runtime
  3. Verify that nano server uses DOTNET_RUNNING_IN_CONTAINERS while the later uses DOTNET_RUNNING_IN_CONTAINER

Expected behavior

Both base image define the same environment variable name

Actual behavior

They have distinct environment variable names

Reference files

https://github.com/dotnet/dotnet-docker/blob/master/2.1/aspnetcore-runtime/nanoserver-1709/amd64/Dockerfile#L36
https://github.com/dotnet/dotnet-docker/blob/master/2.1/runtime-deps/stretch-slim/amd64/Dockerfile#L21

My proposed solution would be to change all windows based images to use DOTNET_RUNNING_IN_CONTAINER (singular). See them here

I have created PR 678 as an optional solution.

@MichaelSimons
Copy link
Member

@fbeltrao - Thanks for logging this issue. When fixing this, I don't think we should be simply renaming the existing variable in the nanoserver images to be singular. As you noted in the PR this is considered a breaking change.

Since 2.1 is going to be LTSC, I am in favor of adding the singular version. In the 2.2 images (which are in preview) and going forward, we can make the correction so that there is only on variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants