diff --git a/.github/ISSUE_TEMPLATE/new-distro-release.md b/.github/ISSUE_TEMPLATE/new-distro-release.md index 2c48ac6fac..94b9aa10d0 100644 --- a/.github/ISSUE_TEMPLATE/new-distro-release.md +++ b/.github/ISSUE_TEMPLATE/new-distro-release.md @@ -28,7 +28,7 @@ assignees: lbussell 1. - [ ] Get PR signoff 1. - [ ] Merge PR to nightly branch 1. - [ ] Wait for automatically queued CI build to finish on [dotnet-docker-nightly pipeline](https://dev.azure.com/dnceng/internal/_build?definitionId=359) (internal MSFT link) -1. - [ ] Confirm READMEs have been updated in [Docker Hub](https://hub.docker.com/_/microsoft-dotnet) +1. - [ ] Confirm READMEs have been updated in [Docker Hub](https://hub.docker.com/r/microsoft/dotnet) ## Main Branch Tasks diff --git a/.github/ISSUE_TEMPLATE/new-windows-release.md b/.github/ISSUE_TEMPLATE/new-windows-release.md index 7a415e4551..51964b0ee6 100644 --- a/.github/ISSUE_TEMPLATE/new-windows-release.md +++ b/.github/ISSUE_TEMPLATE/new-windows-release.md @@ -32,4 +32,4 @@ assignees: lbussell ## Nightly Branch Tasks -- [ ] Merge these changes to the nightly branch as part of the nightly branch [release process](dotnet-release.md) for the next .NET release. +- [ ] Merge these changes to the nightly branch as part of the nightly branch [release process](releases/dotnet-release-lifecycle.md) for the next .NET release. diff --git a/.github/ISSUE_TEMPLATE/releases/dotnet-release-lifecycle.md b/.github/ISSUE_TEMPLATE/releases/dotnet-release-lifecycle.md index 475dc9c205..4533c2f8ea 100644 --- a/.github/ISSUE_TEMPLATE/releases/dotnet-release-lifecycle.md +++ b/.github/ISSUE_TEMPLATE/releases/dotnet-release-lifecycle.md @@ -23,7 +23,7 @@ Add due dates to each of the issues so that we don't lose track of them. - Adjust existing templates or add new templates in `eng/dockerfile-templates/` if necessary - If there are no major changes between .NET versions, the new images can share `runtime-deps` layers with the previous .NET version - Include only the latest/LTS version of each operating system according to our [supported operating systems documentation](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-platforms.md#operating-systems). - - If adding a new OS version, follow the guidelines in [new-distro-release.md](https://raw.githubusercontent.com/dotnet/dotnet-docker/main/.github/ISSUE_TEMPLATE/releases/new-distro-release.md) + - If adding a new OS version, follow the guidelines in [new-distro-release.md](../new-distro-release.md) - If PowerShell is not yet supported or functional on the new .NET version, file an issue at [PowerShell/PowerShell](https://github.com/PowerShell/PowerShell/issues) or link to an existing issue, exclude PowerShell from the new SDK images, and [file an issue](https://github.com/dotnet/dotnet-docker/issues/new/choose) to re-enable PowerShell in .NET Docker images - [ ] Update tests - [ ] Add new version info to [ImageVersion.cs](https://github.com/dotnet/dotnet-docker/blob/nightly/tests/Microsoft.DotNet.Docker.Tests/ImageVersion.cs) diff --git a/.github/linters/.check-markdown-links.json b/.github/linters/.check-markdown-links.json new file mode 100644 index 0000000000..8cabac9afb --- /dev/null +++ b/.github/linters/.check-markdown-links.json @@ -0,0 +1,20 @@ +{ + "ignorePatterns": [ + { + "pattern": "^https://dev.azure.com/dnceng/internal/_build\\?definitionId=359" + }, + { + "pattern": "^https://github.com/dotnet/release/blob/main/.github/ISSUE_TEMPLATE/dotnet-docker-servicing-release.md" + }, + { + "pattern": "^https://mcr.microsoft.com/v2/\\{\\{REPO\\}\\}/tags/list" + }, + { + "pattern": "^https://github.com/dotnet/dotnet-docker/blob/\\{\\{if" + }, + { + "pattern": "^l-is-the-package-in-the-linux-distro-base-image" + } + ], + "aliveStatusCodes": [200, 406] +} diff --git a/.github/workflows/check-markdown-links.yml b/.github/workflows/check-markdown-links.yml new file mode 100644 index 0000000000..225f3ed838 --- /dev/null +++ b/.github/workflows/check-markdown-links.yml @@ -0,0 +1,24 @@ +name: 'Check Markdown Links' + +on: + pull_request: + paths: + - "**/*.md" + +permissions: + pull-requests: read + +jobs: + check-markdown-links: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check markdown links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + config-file: .github/linters/.check-markdown-links.json + use-quiet-mode: 'yes' + use-verbose-mode: 'no' diff --git a/.portal-docs/docker-hub/README.monitor-base.md b/.portal-docs/docker-hub/README.monitor-base.md index 4a4ca80420..01187a462d 100644 --- a/.portal-docs/docker-hub/README.monitor-base.md +++ b/.portal-docs/docker-hub/README.monitor-base.md @@ -50,7 +50,7 @@ The following Dockerfiles demonstrate how you can use this base image to build a # Full Tag Listing -View the current tags at the [Microsoft Artifact Registry portal](https://mcr.microsoft.com/product/dotnet/monitor/base/tags) or on [GitHub](https://github.com/dotnet/dotnet-docker/blob/main/README.base.md#full-tag-listing). +View the current tags at the [Microsoft Artifact Registry portal](https://mcr.microsoft.com/product/dotnet/monitor/base/tags) or on [GitHub](https://github.com/dotnet/dotnet-docker/blob/main/README.monitor-base.md#full-tag-listing). # Support diff --git a/.portal-docs/docker-hub/README.runtime-deps.md b/.portal-docs/docker-hub/README.runtime-deps.md index 2205910cfa..45aa3c7b32 100644 --- a/.portal-docs/docker-hub/README.runtime-deps.md +++ b/.portal-docs/docker-hub/README.runtime-deps.md @@ -22,7 +22,7 @@ Please see the [Ubuntu Chiseled + .NET](https://github.com/dotnet/dotnet-docker/ The [.NET Docker samples](https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md) show various ways to use .NET and Docker together. See [Building Docker Images for .NET Applications](https://docs.microsoft.com/dotnet/core/docker/building-net-docker-images) to learn more. -* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian-x64-slim) builds and runs an application as a self-contained application. +* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian) builds and runs an application as a self-contained application. # Image Variants diff --git a/.portal-docs/mar/README.runtime-deps.portal.md b/.portal-docs/mar/README.runtime-deps.portal.md index f92e11a81d..4bd4fce355 100644 --- a/.portal-docs/mar/README.runtime-deps.portal.md +++ b/.portal-docs/mar/README.runtime-deps.portal.md @@ -40,7 +40,7 @@ Please see the [Ubuntu Chiseled + .NET](https://github.com/dotnet/dotnet-docker/ The [.NET Docker samples](https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md) show various ways to use .NET and Docker together. See [Building Docker Images for .NET Applications](https://docs.microsoft.com/dotnet/core/docker/building-net-docker-images) to learn more. -* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian-x64-slim) builds and runs an application as a self-contained application. +* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian) builds and runs an application as a self-contained application. ## Image Variants diff --git a/README.runtime-deps.md b/README.runtime-deps.md index 4378eeda5e..8f7ea8b38b 100644 --- a/README.runtime-deps.md +++ b/README.runtime-deps.md @@ -24,7 +24,7 @@ Please see the [Ubuntu Chiseled + .NET](https://github.com/dotnet/dotnet-docker/ The [.NET Docker samples](https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md) show various ways to use .NET and Docker together. See [Building Docker Images for .NET Applications](https://docs.microsoft.com/dotnet/core/docker/building-net-docker-images) to learn more. -* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian-x64-slim) builds and runs an application as a self-contained application. +* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian) builds and runs an application as a self-contained application. ## Image Variants diff --git a/documentation/guiding-principles.md b/documentation/guiding-principles.md index 0abc6015bf..f21d39e0fc 100644 --- a/documentation/guiding-principles.md +++ b/documentation/guiding-principles.md @@ -40,7 +40,7 @@ See the [supported tags](supported-tags.md) for the tagging practices and polici 1. Images will be rebuilt only as necessary in order to limit downstream image rebuilds and deployments for consumers of .NET images. The [Image Update Policy](https://github.com/dotnet/dotnet-docker/blob/main/README.md#image-update-policy) section of the README contains the exact guidelines for when images will be updated. -1. Images will never be deleted from the [official Docker repositories](https://hub.docker.com/_/microsoft-dotnet/). This does not apply to the [nightly repositories](https://github.com/dotnet/dotnet-docker/blob/nightly/README.md). +1. Images will never be deleted from the [official Docker repositories](https://hub.docker.com/r/microsoft/dotnet/). This does not apply to the [nightly repositories](https://github.com/dotnet/dotnet-docker/blob/nightly/README.md). 1. The [Dockerfiles](https://github.com/dotnet/dotnet-docker/search?q=filename%3ADockerfile) used to produce all of the images will be publicly available. Customers will be able to take the Dockerfiles and build them to produce their own equivalent images. No special build steps or permissions should be needed to build the Dockerfiles. diff --git a/documentation/image-artifact-details.md b/documentation/image-artifact-details.md index 086cfc6afd..cc592ea162 100644 --- a/documentation/image-artifact-details.md +++ b/documentation/image-artifact-details.md @@ -19,7 +19,7 @@ You can see these components installed in the [runtime](https://github.com/dotne ### .NET Runtime Image -The [.NET runtime image](https://hub.docker.com/_/microsoft-dotnet-runtime/) includes the .NET runtime, with an associated license and third party notice file. +The [.NET runtime image](https://hub.docker.com/r/microsoft/dotnet-runtime/) includes the .NET runtime, with an associated license and third party notice file. ```console $ docker run --rm mcr.microsoft.com/dotnet/runtime:6.0-bullseye-slim /bin/sh -c "find ./usr/share/dotnet | grep LICENSE" @@ -54,7 +54,7 @@ $ docker run --rm mcr.microsoft.com/dotnet/runtime:6.0-bullseye-slim /bin/sh -c ### ASP.NET Core Image -The [ASP.NET Core image](https://hub.docker.com/_/microsoft-dotnet-aspnet/) includes ASP.NET Core in addition to .NET, with associated licenses and third party notice files. +The [ASP.NET Core image](https://hub.docker.com/r/microsoft/dotnet-aspnet/) includes ASP.NET Core in addition to .NET, with associated licenses and third party notice files. ```console $ docker run --rm mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim /bin/sh -c "find ./usr/share/dotnet | grep LICENSE" @@ -66,7 +66,7 @@ $ docker run --rm mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim /bin/sh -c " ### .NET SDK Image -The [SDK image](https://hub.docker.com/_/microsoft-dotnet-sdk/) includes the .NET SDK, which includes various .NET components, with associated licenses and third party notice files. +The [SDK image](https://hub.docker.com/r/microsoft/dotnet-sdk/) includes the .NET SDK, which includes various .NET components, with associated licenses and third party notice files. ```console $ docker run --rm mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim /bin/sh -c "find ./usr/share/dotnet ./usr/share/powershell | grep LICENSE" diff --git a/documentation/image-variants.md b/documentation/image-variants.md index 3607904c7f..9271c6c2b7 100644 --- a/documentation/image-variants.md +++ b/documentation/image-variants.md @@ -8,7 +8,7 @@ These images are intended to satisfy the most common use cases of .NET developer Alpine and [Ubuntu Chiseled](./ubuntu-chiseled.md) .NET images are focused on size. By default, these images do not include `icu` or `tzdata`, meaning that these images only work with apps that are configured for [globalization-invariant mode](https://learn.microsoft.com/dotnet/core/runtime-config/globalization). -Apps that require globalization support can use the `extra` image variant of the [dotnet/runtime-deps](https://hub.docker.com/_/microsoft-dotnet-runtime-deps/) images. Because this is only available with `runtime-deps` images, it requires a [self-contained deployment](https://learn.microsoft.com/dotnet/core/deploying/#publish-self-contained) of the application. +Apps that require globalization support can use the `extra` image variant of the [dotnet/runtime-deps](https://hub.docker.com/r/microsoft/dotnet-runtime-deps/) images. Because this is only available with `runtime-deps` images, it requires a [self-contained deployment](https://learn.microsoft.com/dotnet/core/deploying/#publish-self-contained) of the application. Alpine, Azure Linux, and Ubuntu Chiseled images also come in `extra`, `composite`, and `aot` variants (see below). ## Distroless @@ -36,6 +36,6 @@ Please see ["Limitations of Native AOT deployment"](https://learn.microsoft.com/ They also require the use of the `aot` SDK image which include extra libraries needed for Native AOT compilation. > [!NOTE] -> `aot` images are only available as a preview in the [dotnet/nightly/sdk](https://hub.docker.com/_/microsoft-dotnet-nightly-sdk/) and [dotnet/nightly/runtime-deps](https://hub.docker.com/_/microsoft-dotnet-nightly-runtime-deps/) repos. +> `aot` images are only available as a preview in the [dotnet/nightly/sdk](https://hub.docker.com/r/microsoft/dotnet-nightly-sdk/) and [dotnet/nightly/runtime-deps](https://hub.docker.com/r/microsoft/dotnet-nightly-runtime-deps/) repos. > Native AOT compiled apps will function exactly the same on the existing `runtime-deps` (non-`aot`) images, but with a larger deployment size. > Please try out these new, smaller images and give us feedback! diff --git a/documentation/scenarios/installing-dotnet.md b/documentation/scenarios/installing-dotnet.md index f890e64843..4f11314197 100644 --- a/documentation/scenarios/installing-dotnet.md +++ b/documentation/scenarios/installing-dotnet.md @@ -1,16 +1,16 @@ # Installing .NET in a Dockerfile -There can be times where you need .NET installed on a base image that is unavailable amongst the set of official [.NET Docker images](https://hub.docker.com/_/microsoft-dotnet), such as a different Linux distro version or a Windows Server Core image. In that case, you'll need to author your own Dockerfile which installs .NET. The snippets below describe how to do this. +There can be times where you need .NET installed on a base image that is unavailable amongst the set of official [.NET Docker images](https://hub.docker.com/r/microsoft/dotnet), such as a different Linux distro version or a Windows Server Core image. In that case, you'll need to author your own Dockerfile which installs .NET. The snippets below describe how to do this. There are two scenarios you should consider depending on how your Docker image is to be consumed: [general platform images](#general-platform-images) and [custom application images](#custom-application-images). But before getting to that, let's first consider whether you actually need to go down this road. ## Determine whether a different base image is needed -Before doing all the work of authoring and maintaining a Dockerfile that installs .NET, it's worthwhile to stop and thoroughly analyze whether you actually do need a different base image than those provided as part of the set of official [.NET Docker images](https://hub.docker.com/_/microsoft-dotnet). +Before doing all the work of authoring and maintaining a Dockerfile that installs .NET, it's worthwhile to stop and thoroughly analyze whether you actually do need a different base image than those provided as part of the set of official [.NET Docker images](https://hub.docker.com/r/microsoft/dotnet). -If there's a platform that you require that is available in its own Docker image, ask yourself whether it would be better to use that image and add .NET to it or would it be better to use the .NET image as the base and add the platform to it. An example scenario is using the .NET runtime with PowerShell Core; determine whether you would prefer to start with a [PowerShell Core](https://hub.docker.com/_/microsoft-powershell) image and install .NET runtime onto it or start with a [.NET runtime image](https://hub.docker.com/_/microsoft-dotnet-runtime) and install PowerShell Core onto it. +If there's a platform that you require that is available in its own Docker image, ask yourself whether it would be better to use that image and add .NET to it or would it be better to use the .NET image as the base and add the platform to it. An example scenario is using the .NET runtime with PowerShell; determine whether you would prefer to start with a [PowerShell](https://mcr.microsoft.com/product/powershell/about) image and install .NET runtime onto it or start with a [.NET runtime image](https://hub.docker.com/r/microsoft/dotnet-runtime) and install PowerShell Core onto it. -In some cases, you can workaround dependencies by publishing your .NET application as a [self-contained app](https://docs.microsoft.com/en-us/dotnet/core/deploying) in which case all of your app's dependencies are packaged with the app. This reduces the dependencies that need to be installed separately on the base image. For example, a Windows app may require dependencies that only exist in Windows Server Core but only .NET (pre-5.0) images on Nano Server are available. In that case, the app could be deployed as a self-contained app and operate just fine using the [windows/servercore](https://hub.docker.com/_/microsoft-windows-servercore) image as the base image. Example Dockerfiles that demonstrate publishing a self-contained app are available in the samples for [Linux](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian-x64-slim) and [Windows](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.nanoserver-x64-slim). +In some cases, you can workaround dependencies by publishing your .NET application as a [self-contained app](https://docs.microsoft.com/en-us/dotnet/core/deploying) in which case all of your app's dependencies are packaged with the app. This reduces the dependencies that need to be installed separately on the base image. For example, a Windows app may require dependencies that only exist in Windows Server Core but only .NET (pre-5.0) images on Nano Server are available. In that case, the app could be deployed as a self-contained app and operate just fine using the [windows/servercore](https://hub.docker.com/r/microsoft/windows-servercore) image as the base image. Example Dockerfiles that demonstrate publishing a self-contained app are available in the samples for [Linux](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian) and [Windows](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.nanoserver). ## Image Purposes @@ -32,7 +32,7 @@ For custom application images, it is recommended that you install .NET by [packa When authoring your Dockerfiles, you can look to the official [.NET Dockerfiles](https://github.com/dotnet/dotnet-docker) as a template for the install steps. There are several variations depending on the .NET version, OS type, and architecture being used. -In addition to installing .NET, you'll also need to ensure that the [prerequisites](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md) are installed. The [.NET Dockerfiles](https://github.com/dotnet/dotnet-docker) also demonstrate how that can be done. +In addition to installing .NET, you'll also need to ensure that the [prerequisites](https://github.com/dotnet/core/blob/main/linux.md#dependencies) are installed. The [.NET Dockerfiles](https://github.com/dotnet/dotnet-docker) also demonstrate how that can be done. In the spirit of [clarity](https://github.com/docker-library/official-images#clarity), the Dockerfiles for the official .NET Docker images do not use a general purpose script for installing .NET. Rather, they explicitly provide each step of the installation process and reference the exact URL of the binary archive. @@ -137,7 +137,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ A set of [installation scripts](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script) are provided to conveniently install .NET on Linux with Bash or Windows with PowerShell. These scripts can be thought of as a happy medium between the two previously mentioned approaches (binary archive link and package manager). They fill a gap on systems where the desired .NET release is not available through a package manager and you don't want to deal with the cost of maintaining a direct link to a binary package. With the installation script, you have flexibility in specifying which version gets installed. You can install a specific version such as 6.0.0, the latest of a release channel such as the latest 6.0 patch, etc. -In addition to installing .NET, you'll also need to ensure that the [prerequisites](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md) are installed. The [.NET Dockerfiles](https://github.com/dotnet/dotnet-docker) also demonstrate how that can be done. +In addition to installing .NET, you'll also need to ensure that the [prerequisites](https://github.com/dotnet/core/blob/main/linux.md#dependencies) are installed. The [.NET Dockerfiles](https://github.com/dotnet/dotnet-docker) also demonstrate how that can be done. Example (Linux): diff --git a/documentation/scenarios/using-system-drawing-common.md b/documentation/scenarios/using-system-drawing-common.md index 7212ab59a0..227f4f5666 100644 --- a/documentation/scenarios/using-system-drawing-common.md +++ b/documentation/scenarios/using-system-drawing-common.md @@ -1,3 +1,3 @@ # Using the System.Drawing.Common Package in a Docker Container -The required dependencies of the System.Drawing.Common NuGet package are only [available in Windows Server Core and full Server containers](https://learn.microsoft.com/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only). Official .NET images for Windows Server Core are available with tags documented on [Docker Hub](https://hub.docker.com/_/microsoft-dotnet). Example tag: `mcr.microsoft.com/dotnet/aspnet:8.0-windowsservercore-ltsc2022`. +The required dependencies of the System.Drawing.Common NuGet package are only [available in Windows Server Core and full Server containers](https://learn.microsoft.com/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only). Official .NET images for Windows Server Core are available with tags documented on [Docker Hub](https://hub.docker.com/r/microsoft/dotnet). Example tag: `mcr.microsoft.com/dotnet/aspnet:8.0-windowsservercore-ltsc2022`. diff --git a/documentation/vulnerability-reporting.md b/documentation/vulnerability-reporting.md index a2bfd0888f..de8a64e5f1 100644 --- a/documentation/vulnerability-reporting.md +++ b/documentation/vulnerability-reporting.md @@ -77,7 +77,7 @@ If the script above returns an error indicating it's unable to resolve a multi-a The following scripts indicate how to do that. If you're targeting Windows containers, you'll need to determine the Windows build number of the image you're targeting. -To do this, find the Windows version number that is listed on the [Windows Docker Hub page](https://hub.docker.com/_/microsoft-windows-nanoserver). +To do this, find the Windows version number that is listed on the [Windows Docker Hub page](https://hub.docker.com/r/microsoft/windows-nanoserver). For example, if you're targeting Windows Server 2022 LTSC, look for the `ltsc2022` tag and find its corresponding build number in the OS Version column. You only need the first three parts of the version number. In the case of Windows Server 2022, it's `10.0.20348`. @@ -460,7 +460,7 @@ If you get the error "image operating system "windows" cannot be used on this pl ### How can I determine the tag of the Linux distro image that my image is based upon? You'll first need to get the name of the .NET image (e.g. `mcr.microsoft.com/dotnet/aspnet:6.0`) from your Dockerfile. -Take the tag portion of that image name and search for that tag on the [.NET Runtime Dependencies page](https://hub.docker.com/_/microsoft-dotnet-runtime-deps/) within the appropriate "Linux <architecture> Tags" section. +Take the tag portion of that image name and search for that tag on the [.NET Runtime Dependencies page](https://hub.docker.com/r/microsoft/dotnet-runtime-deps/) within the appropriate "Linux <architecture> Tags" section. Navigate to the Dockerfile link associated with that tag. The first `FROM` line of the Dockerfile will have the name of the Linux distro base image (e.g. `amd64/debian:bullseye-slim`). @@ -535,7 +535,7 @@ It's necessary to check with the Linux distro security site to determine whether Your image vulnerability scanner will output an identifer of the vulnerability. This will typically be a CVE number. (Debian also has its own Debian Security Advisory (DSA) numbers). Search for the vulnerability ID on the relevant Linux distro's security site. -If you don't know which Linux distro is relevant for your image, [look up the image tag](https://hub.docker.com/_/microsoft-dotnet) and it will tell you its OS version in the tag listing table. +If you don't know which Linux distro is relevant for your image, [look up the image tag](https://hub.docker.com/r/microsoft/dotnet) and it will tell you its OS version in the tag listing table. The following are links to the security sites for the Linux distros that we support including the URL format to get information on a specific CVE: * Debian: diff --git a/eng/readme-templates/DefaultLayout.md b/eng/readme-templates/DefaultLayout.md index 6924ddcdd6..c07f0b0e8a 100644 --- a/eng/readme-templates/DefaultLayout.md +++ b/eng/readme-templates/DefaultLayout.md @@ -9,8 +9,7 @@ }} ^ set isNightlyRepo to match(split(REPO, "/")[1], "nightly") ^ - set isMonitor to find(split(REPO, "/"), "monitor") >= 0 ^ - set isAspireDashboard to find(split(REPO, "/"), "aspire-dashboard") >= 0 + set readmeRepoName to when(PARENT_REPO = "monitor", cat("monitor-", SHORT_REPO), SHORT_REPO) }}{{InsertTemplate("Announcement.md", union(commonArgs, [ "trailing-line-break": "true" ]))}}{{ if !IS_PRODUCT_FAMILY:{{InsertTemplate("FeaturedTags.md", commonArgs)}} @@ -29,6 +28,6 @@ if !IS_PRODUCT_FAMILY:{{InsertTemplate("FeaturedTags.md", commonArgs)}} {{if ARGS["readme-host"] = "github": *Tags not listed in the table above are not supported. See the [Supported Tags Policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md). See the [full list of tags](https://mcr.microsoft.com/v2/{{REPO}}/tags/list) for all supported and unsupported tags.* ^elif ARGS["readme-host"] = "dockerhub": -View the current tags at the [Microsoft Artifact Registry portal](https://mcr.microsoft.com/product/{{REPO}}/tags) or on [GitHub](https://github.com/dotnet/dotnet-docker/blob/{{if isNightlyRepo:nightly^else:main}}/README.{{SHORT_REPO}}.md#full-tag-listing). +View the current tags at the [Microsoft Artifact Registry portal](https://mcr.microsoft.com/product/{{REPO}}/tags) or on [GitHub](https://github.com/dotnet/dotnet-docker/blob/{{if isNightlyRepo:nightly^else:main}}/README.{{readmeRepoName}}.md#full-tag-listing). }}}} {{InsertTemplate("Support.md", commonArgs)}} diff --git a/eng/readme-templates/Use.runtime-deps.md b/eng/readme-templates/Use.runtime-deps.md index 9455ed1cf5..6226b8c23d 100644 --- a/eng/readme-templates/Use.runtime-deps.md +++ b/eng/readme-templates/Use.runtime-deps.md @@ -2,4 +2,4 @@ _ ARGS: top-header: The string to use as the top-level header. readme-host: Moniker of the site that will host the readme -}}* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian-x64-slim) builds and runs an application as a self-contained application. +}}* [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/Dockerfile.debian) builds and runs an application as a self-contained application. diff --git a/samples/README.md b/samples/README.md index bf5b879881..75f6edddd6 100644 --- a/samples/README.md +++ b/samples/README.md @@ -61,5 +61,5 @@ docker run --rm -it -p 8000:8080 mcr.microsoft.com/dotnet/samples:aspnetapp You can find .NET container images at the following Docker repositories: -* [dotnet](https://hub.docker.com/_/microsoft-dotnet/): .NET -* [dotnet/framework](https://hub.docker.com/_/microsoft-dotnet-framework/): .NET Framework +* [dotnet](https://hub.docker.com/r/microsoft/dotnet/): .NET +* [dotnet/framework](https://hub.docker.com/r/microsoft/dotnet-framework/): .NET Framework diff --git a/samples/build-for-a-platform.md b/samples/build-for-a-platform.md index 2eb4619616..eba51817f0 100644 --- a/samples/build-for-a-platform.md +++ b/samples/build-for-a-platform.md @@ -62,8 +62,8 @@ Another approach is to always build for one platform with Dockerfiles that refer The following are examples of this model: -- [Dockerfile.debian-x64](aspnetapp/Dockerfile.debian-x64) -- [Dockerfile.alpine-arm64](aspnetapp/Dockerfile.alpine-arm64) +- [Dockerfile.debian](aspnetapp/Dockerfile.debian) +- [Dockerfile.alpine](aspnetapp/Dockerfile.alpine) They can be built with the following pattern: @@ -77,7 +77,7 @@ This pattern results in, for example, x64 images always being used. Those images The `--platform` argument is the best way to specify the desired architecture. The `--platform` argument doesn't switch Docker to a special mode, but specifies the platform to request for multi-platform tags. Single-architecture tags are unaffected by this argument. That approach enables users to lock some tags to a platform, if desired, and to enable other tags to be affected by the platform switch. -In addition, Docker [Buildkit exposes multiple environment variables](https://github.com/dotnet/dotnet-docker/pull/4387#issuecomment-1416565213) that can be used to further conditionalize behavior. These environment variables can be controlled with the pattern demonstrated in [Dockerfile](https://github.com/mthalman/dredge/blob/main/src/Valleysoft.Dredge/Dockerfile). As mentioned, .NET doesn't support being run in emulation. The pattern in that Dockerfile results in the SDK always being run natively while the final image is affected by the `--platform` switch. This model also has the best performance since the bulk of computation is run natively. +In addition, Docker [Buildkit exposes multiple environment variables](https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope) that can be used to further conditionalize behavior. These environment variables can be controlled with the pattern demonstrated in [Dockerfile](https://github.com/mthalman/dredge/blob/main/src/Dockerfile). As mentioned, .NET doesn't support being run in emulation. The pattern in that Dockerfile results in the SDK always being run natively while the final image is affected by the `--platform` switch. This model also has the best performance since the bulk of computation is run natively. > [!NOTE] > We are enabling this [model](https://github.com/dotnet/dotnet-docker/issues/4388#issuecomment-1421401384) in a future release. diff --git a/samples/build-in-sdk-container.md b/samples/build-in-sdk-container.md index a34a0ac21f..efccc2cc2f 100644 --- a/samples/build-in-sdk-container.md +++ b/samples/build-in-sdk-container.md @@ -1,6 +1,6 @@ # Build in a .NET SDK container -You can use Docker to run your build in an isolated environment using the [.NET SDK Docker image](https://hub.docker.com/_/microsoft-dotnet-sdk/). This is useful to either avoid the need to install .NET on the build machine or ensure that your environment is correctly configured (dev, staging, or production). +You can use Docker to run your build in an isolated environment using the [.NET SDK Docker image](https://hub.docker.com/r/microsoft/dotnet-sdk/). This is useful to either avoid the need to install .NET on the build machine or ensure that your environment is correctly configured (dev, staging, or production). The instructions assume that you have cloned the repository locally, and that you are in the `samples/dotnetapp` directory (due to the volume mounting syntax), as demonstrated by the examples. diff --git a/samples/complexapp/Dockerfile b/samples/complexapp/Dockerfile index 66ac3dc4f0..457ced409f 100644 --- a/samples/complexapp/Dockerfile +++ b/samples/complexapp/Dockerfile @@ -1,4 +1,4 @@ -# https://hub.docker.com/_/microsoft-dotnet +# https://hub.docker.com/r/microsoft/dotnet FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /source diff --git a/samples/run-tests-in-sdk-container.md b/samples/run-tests-in-sdk-container.md index bbdff9731a..72fa92f271 100644 --- a/samples/run-tests-in-sdk-container.md +++ b/samples/run-tests-in-sdk-container.md @@ -1,6 +1,6 @@ # Running Tests with Docker -You can use Docker to run your unit tests in an isolated environment using the [.NET SDK Docker image](https://hub.docker.com/_/microsoft-dotnet-sdk/). This is useful if your development and production environments don't match, like, for example, Windows and Linux, respectively. There are multiple ways to run unit tests in containers, which are demonstrated in this document. +You can use Docker to run your unit tests in an isolated environment using the [.NET SDK Docker image](https://hub.docker.com/r/microsoft/dotnet-sdk/). This is useful if your development and production environments don't match, like, for example, Windows and Linux, respectively. There are multiple ways to run unit tests in containers, which are demonstrated in this document. [Building in an SDK container](build-in-sdk-container.md) is a similar scenario and relies on similar patterns. [Building and testing multiple projects with Docker](complexapp/README.md) sample offers additional test patterns that you may want to adopt. diff --git a/samples/selecting-tags.md b/samples/selecting-tags.md index c0acc1d42a..eb42153e24 100644 --- a/samples/selecting-tags.md +++ b/samples/selecting-tags.md @@ -6,17 +6,17 @@ You can use the referenced images and tags with the docker CLI, for example with ## .NET Docker repos -There are multiple [.NET Docker repos](https://hub.docker.com/_/microsoft-dotnet) that expose various layers of the .NET platform. +There are multiple [.NET Docker repos](https://hub.docker.com/r/microsoft/dotnet) that expose various layers of the .NET platform. -* [dotnet/runtime-deps](https://hub.docker.com/_/microsoft-dotnet-runtime-deps/) -- Linux-only images that contains the native dependencies of .NET. Best used for self-contained applications. -* [dotnet/runtime](https://hub.docker.com/_/microsoft-dotnet-runtime/) -- Images that contains the .NET runtime. Best used for console applications. On Linux, depends on the `runtime-deps` image. -* [dotnet/aspnet](https://hub.docker.com/_/microsoft-dotnet-aspnet/) -- Images that contains the ASP.NET Core runtime. Best used for web applications and services. Depends on the `runtime` image. -* [dotnet/sdk](https://hub.docker.com/_/microsoft-dotnet-sdk/) -- An image that contains the .NET SDK (which includes tools and all runtimes). Best used for building and testing applications. Depends on [buildpack-deps](https://hub.docker.com/_/buildpack-deps) for Debian and Ubuntu, on [dotnet/aspnet](https://hub.docker.com/_/microsoft-dotnet-aspnet/) for Alpine and on [windows/nanoserver](https://hub.docker.com/_/microsoft-windows-nanoserver) for Windows. +* [dotnet/runtime-deps](https://hub.docker.com/r/microsoft/dotnet-runtime-deps/) -- Linux-only images that contains the native dependencies of .NET. Best used for self-contained applications. +* [dotnet/runtime](https://hub.docker.com/r/microsoft/dotnet-runtime/) -- Images that contains the .NET runtime. Best used for console applications. On Linux, depends on the `runtime-deps` image. +* [dotnet/aspnet](https://hub.docker.com/r/microsoft/dotnet-aspnet/) -- Images that contains the ASP.NET Core runtime. Best used for web applications and services. Depends on the `runtime` image. +* [dotnet/sdk](https://hub.docker.com/r/microsoft/dotnet-sdk/) -- An image that contains the .NET SDK (which includes tools and all runtimes). Best used for building and testing applications. Depends on [buildpack-deps](https://hub.docker.com/_/buildpack-deps) for Debian and Ubuntu, on [dotnet/aspnet](https://hub.docker.com/r/microsoft/dotnet-aspnet/) for Alpine and on [windows/nanoserver](https://hub.docker.com/r/microsoft/windows-nanoserver) for Windows. The repos above are commonly used on the command line and in Dockerfiles. There are two more repos that may be useful to you: * [dotnet/nightly](https://github.com/dotnet/dotnet-docker/blob/nightly/README.md) -- A duplicate structure of repos which contain the latest pre-released versions of .NET. (which are not supported in production). -* [dotnet/samples](https://hub.docker.com/_/microsoft-dotnet-samples) -- A set of samples that demonstrate .NET being used in console and web scenarios. +* [dotnet/samples](https://hub.docker.com/r/microsoft/dotnet-samples) -- A set of samples that demonstrate .NET being used in console and web scenarios. ## Tags that work everywhere