Skip to content

Update samples for platform targeting#4441

Closed
richlander wants to merge 7 commits intodotnet:mainfrom
richlander:build-platform
Closed

Update samples for platform targeting#4441
richlander wants to merge 7 commits intodotnet:mainfrom
richlander:build-platform

Conversation

@richlander
Copy link
Member

@richlander richlander commented Feb 22, 2023

@mthalman
Copy link
Member

Is this going to be backported to 7.0?

## Container sample: Run a simple application

Enter the following command to run a console app in a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/):
The following example runs a [.NET console app container image](https://hub.docker.com/_/microsoft-dotnet-samples/):
Copy link
Member

Choose a reason for hiding this comment

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

Nit.

Suggested change
The following example runs a [.NET console app container image](https://hub.docker.com/_/microsoft-dotnet-samples/):
The following example runs a [.NET console app container](https://hub.docker.com/_/microsoft-dotnet-samples/):

## Container sample: Run a web app

Enter the following command to run a console app in a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/):
The following example runs an [ASP.NET Core container image](https://hub.docker.com/_/microsoft-dotnet-samples/):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The following example runs an [ASP.NET Core container image](https://hub.docker.com/_/microsoft-dotnet-samples/):
The following example runs an [ASP.NET Core container](https://hub.docker.com/_/microsoft-dotnet-samples/):


## Image Update Policy

* We update the supported .NET images within 12 hours of any updates to their base images (e.g. debian:buster-slim, windows/nanoserver:ltsc2022, buildpack-deps:bionic-scm, etc.).
Copy link
Member

Choose a reason for hiding this comment

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

This was removed but we don't actually mention this 12 hour SLA anywhere else.

@@ -9,38 +9,25 @@

Copy link
Member

Choose a reason for hiding this comment

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

Any changes to this doc need to be made the corresponding template file(s) in eng/readme-templates. This entire file is generated from those templates.

* [Contact Microsoft Support](https://support.microsoft.com/contactus/)

# License
## License
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be reverted. This header needs to be top-level to conform to the MAR Portal spec for readmes.

Suggested change
## License
# License


## Annotated Dockerfile -- Advanced platform targeting

The following [Dockerfile](aspnetapp/Dockerfile.alpine) offers more control for targeting, with the `--platform` switch. It is very similar to the prior sample, with a couple variations to change the behavior. In particular, we want the .NET SDK to always run natively (best performance and avoids running in QEMU, which .NET doesn't support).
Copy link
Member

Choose a reason for hiding this comment

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

Provide a link to build-for-a-platform.md?

Comment on lines +153 to +154
# This launch pattern launches an executable (since this Dockerfile is Linux-specific).
ENTRYPOINT ["./aspnetapp"]
Copy link
Member

Choose a reason for hiding this comment

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

I think we should continue to use the DLL. See #3392

Comment on lines +177 to +178


Copy link
Member

Choose a reason for hiding this comment

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

Remove extra lines

# copy csproj and restore as distinct layers
COPY *.csproj .
RUN dotnet restore --use-current-runtime
RUN dotnet restore --use-current-runtime
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
RUN dotnet restore --use-current-runtime
RUN dotnet restore --use-current-runtime

@@ -1,147 +0,0 @@
# Selecting .NET tags
Copy link
Member

Choose a reason for hiding this comment

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

Why was this doc removed? There's useful information in here, particularly in the "Targeting a specific operating system" section.

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