Skip to content

.NET 10: further align the runtime image with Microsoft images.#519

Merged
tmds merged 3 commits intoredhat-developer:mainfrom
tmds:10_updates
Nov 4, 2025
Merged

.NET 10: further align the runtime image with Microsoft images.#519
tmds merged 3 commits intoredhat-developer:mainfrom
tmds:10_updates

Conversation

@tmds
Copy link
Member

@tmds tmds commented Oct 17, 2025

SDK specific envvars are moved from the runtime to the SDK image.

All s2i related functionality is moved into the SDK image.

WORKDIR, CMD, and PATH envvar are set to match with Microsoft images.

The DOTNET_DATA_PATH dir is removed. It is left to the user's application to create such a directory (if needed).

@tmds tmds requested a review from omajid October 17, 2025 13:08
SDK specific envvars are moved from the runtime to the SDK image.

All s2i related functionality is moved into the SDK image.

WORKDIR, CMD, and PATH envvar are set to match with Microsoft images.

The DOTNET_DATA_PATH dir is removed. It is left to the user's application to create such a directory (if needed).

USER 0
# Don't clutter the app user's HOME
ENV HOME=
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this over letting root mess in the app user's HOME and then having to fix permissions for those files.
This way, we separate between the root and app user's HOME.

# Don't download/extract docs for nuget packages
NUGET_XMLDOC_MODE=skip \
# Configure ASP.NET Core to use the exposed port
ASPNETCORE_URLS=http://*:8080 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we drop ASPNETCORE_URLS too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, maybe set ASPNETCORE_HTTP_PORTS like the Microsoft image does?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We adopted and reverted it for .NET 8: #474.

I'm ok with changing to ASPNETCORE_HTTP_PORTS for .NET 10.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for that context. Given the regression and that we reverted it, I am okay with leaving it as it is. Up to you what you prefer here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this without changing ASPNETCORE_HTTP_PORTS. As time permits, I'll take a closer look into making this change for .NET 10 or not.

DOTNET_APP_PATH=/opt/app-root/app \
DOTNET_DEFAULT_CMD=default-cmd.sh \
# Don't generate a developer certificate
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft images also set DOTNET_ROLL_FORWARD.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems they do it in the SDK image because PowerShell (which is part of the MS SDK image) didn't roll forward.

I think we can continue to leave it out.

@tmds tmds merged commit 5637865 into redhat-developer:main Nov 4, 2025
@tmds
Copy link
Member Author

tmds commented Nov 4, 2025

@omajid, thanks for the thorough review!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants