Update samples for platform targeting#4441
Conversation
|
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/): |
There was a problem hiding this comment.
Nit.
| 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/): |
There was a problem hiding this comment.
| 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.). |
There was a problem hiding this comment.
This was removed but we don't actually mention this 12 hour SLA anywhere else.
| @@ -9,38 +9,25 @@ | |||
|
|
|||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
This needs to be reverted. This header needs to be top-level to conform to the MAR Portal spec for readmes.
| ## 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). |
There was a problem hiding this comment.
Provide a link to build-for-a-platform.md?
| # This launch pattern launches an executable (since this Dockerfile is Linux-specific). | ||
| ENTRYPOINT ["./aspnetapp"] |
There was a problem hiding this comment.
I think we should continue to use the DLL. See #3392
|
|
||
|
|
| # copy csproj and restore as distinct layers | ||
| COPY *.csproj . | ||
| RUN dotnet restore --use-current-runtime | ||
| RUN dotnet restore --use-current-runtime |
There was a problem hiding this comment.
| RUN dotnet restore --use-current-runtime | |
| RUN dotnet restore --use-current-runtime |
| @@ -1,147 +0,0 @@ | |||
| # Selecting .NET tags | |||
There was a problem hiding this comment.
Why was this doc removed? There's useful information in here, particularly in the "Targeting a specific operating system" section.
Uh oh!
There was an error while loading. Please reload this page.