├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── config.yml │ ├── feature-request.md │ └── releases │ ├── dotnet-release.md │ ├── new-distro-release.md │ ├── new-windows-release.md │ └── patch-tuesday-release.md ├── .gitignore ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.aspnet.md ├── README.md ├── README.runtime-deps.md ├── README.runtime.md ├── README.samples.md ├── README.sdk.md ├── SECURITY.md ├── build-and-test.ps1 ├── documentation ├── guiding-principles.md ├── image-artifact-details-alpine-package-details.png ├── image-artifact-details-alpine-package-search.png ├── image-artifact-details.md ├── scenarios │ ├── README.md │ ├── installing-dotnet.md │ ├── nuget-credentials.md │ └── using-system-drawing-common.md ├── supported-platforms.md └── supported-tags.md ├── eng ├── common │ ├── Dockerfile.WithRepo │ ├── Get-BaseImageStatus.ps1 │ ├── Get-ImageBuilder.ps1 │ ├── Install-DotNetSdk.ps1 │ ├── Invoke-CleanupDocker.ps1 │ ├── Invoke-ImageBuilder.ps1 │ ├── Invoke-ReadmeGeneration.ps1 │ ├── Invoke-WithRetry.ps1 │ ├── build.ps1 │ ├── pull-image.sh │ ├── readme.md │ └── templates │ │ ├── jobs │ │ ├── build-images.yml │ │ ├── generate-matrix.yml │ │ ├── post-build.yml │ │ ├── publish.yml │ │ ├── test-images-linux-client.yml │ │ ├── test-images-windows-client.yml │ │ ├── validate-image-sizes.yml │ │ └── wait-for-ingestion.yml │ │ ├── stages │ │ └── build-test-publish-repo.yml │ │ ├── steps │ │ ├── cleanup-docker-linux.yml │ │ ├── cleanup-docker-windows.yml │ │ ├── download-build-artifact.yml │ │ ├── init-docker-linux.yml │ │ ├── init-docker-windows.yml │ │ ├── publish-readmes.yml │ │ ├── set-image-info-path-var.yml │ │ ├── test-images-linux-client.yml │ │ ├── test-images-windows-client.yml │ │ ├── validate-branch.yml │ │ ├── validate-image-sizes.yml │ │ ├── wait-for-mcr-doc-ingestion.yml │ │ └── wait-for-mcr-image-ingestion.yml │ │ └── variables │ │ ├── common-paths.yml │ │ ├── common.yml │ │ └── docker-images.yml ├── dockerfile-templates │ ├── Get-GeneratedDockerfiles.ps1 │ ├── aspnet │ │ ├── 2.1 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ └── Dockerfile.nanoserver │ │ ├── 3.1 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ └── Dockerfile.nanoserver │ │ ├── 5.0 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ ├── Dockerfile.nanoserver │ │ │ └── Dockerfile.windowsservercore │ │ └── 6.0 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ ├── Dockerfile.nanoserver │ │ │ └── Dockerfile.windowsservercore │ ├── runtime-deps │ │ ├── 2.1 │ │ │ ├── Dockerfile.alpine │ │ │ └── Dockerfile.linux │ │ └── 3.1 │ │ │ ├── Dockerfile.alpine │ │ │ └── Dockerfile.linux │ ├── runtime │ │ ├── 2.1 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ └── Dockerfile.nanoserver │ │ ├── 3.1 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ └── Dockerfile.nanoserver │ │ ├── 5.0 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ ├── Dockerfile.nanoserver │ │ │ └── Dockerfile.windowsservercore │ │ └── 6.0 │ │ │ ├── Dockerfile.alpine │ │ │ ├── Dockerfile.linux │ │ │ ├── Dockerfile.nanoserver │ │ │ └── Dockerfile.windowsservercore │ └── sdk │ │ ├── 2.1 │ │ ├── Dockerfile.alpine │ │ ├── Dockerfile.linux │ │ └── Dockerfile.nanoserver │ │ ├── 3.1 │ │ ├── Dockerfile.alpine │ │ ├── Dockerfile.linux │ │ └── Dockerfile.nanoserver │ │ ├── 5.0 │ │ ├── Dockerfile.alpine │ │ ├── Dockerfile.linux │ │ ├── Dockerfile.nanoserver │ │ └── Dockerfile.windowsservercore │ │ └── 6.0 │ │ ├── Dockerfile.alpine │ │ ├── Dockerfile.linux │ │ ├── Dockerfile.nanoserver │ │ └── Dockerfile.windowsservercore ├── get-drop-versions-monitor.sh ├── get-drop-versions.sh ├── mcr-tags-metadata-templates │ ├── aspnet-tags.yml │ ├── runtime-deps-tags.yml │ ├── runtime-tags.yml │ ├── samples-tags.yml │ └── sdk-tags.yml ├── pipelines │ ├── README.md │ ├── dotnet-core-nightly-pr-no-cache.yml │ ├── dotnet-core-nightly-pr.yml │ ├── dotnet-core-nightly.yml │ ├── dotnet-core-pr.yml │ ├── dotnet-core-samples-pr.yml │ ├── dotnet-core-samples.yml │ ├── dotnet-core-size-validation-pr.yml │ ├── dotnet-core-size-validation.yml │ ├── dotnet-core.yml │ ├── update-dependencies.yml │ ├── update-readmes.yml │ ├── variables │ │ ├── common.yml │ │ ├── core.yml │ │ └── samples.yml │ └── wait-for-ingestion.yml ├── readme-templates │ ├── About.aspnet.md │ ├── About.md │ ├── About.monitor.md │ ├── About.runtime-deps.md │ ├── About.runtime.md │ ├── About.samples.md │ ├── About.sdk.md │ ├── Get-GeneratedReadmes.ps1 │ ├── README.md │ ├── Use.aspnet.md │ ├── Use.md │ ├── Use.monitor.md │ ├── Use.runtime-deps.md │ ├── Use.runtime.md │ ├── Use.samples.md │ └── Use.sdk.md └── update-dependencies │ ├── Dockerfile │ ├── DockerfileShaUpdater.cs │ ├── ErrorTraceListener.cs │ ├── NuGet.config │ ├── Options.cs │ ├── Program.cs │ ├── ScriptRunnerUpdater.cs │ ├── VariableHelper.cs │ ├── VersionType.cs │ ├── VersionUpdater.cs │ └── update-dependencies.csproj ├── manifest.json ├── manifest.samples.json ├── manifest.versions.json ├── samples ├── Directory.Build.props ├── README.md ├── aspnetapp │ ├── .dockerignore │ ├── Dockerfile │ ├── Dockerfile.alpine-arm64 │ ├── Dockerfile.alpine-x64 │ ├── Dockerfile.alpine-x64-slim │ ├── Dockerfile.debian-arm32 │ ├── Dockerfile.debian-arm64 │ ├── Dockerfile.debian-x64 │ ├── Dockerfile.debian-x64-slim │ ├── Dockerfile.nanoserver-x64 │ ├── Dockerfile.nanoserver-x64-slim │ ├── Dockerfile.ubuntu-x64 │ ├── Dockerfile.windowsservercore-x64 │ ├── Dockerfile.windowsservercore-x64-slim │ ├── README.md │ ├── aspnetapp.sln │ └── aspnetapp │ │ ├── Pages │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Index.cshtml.cs │ │ ├── Privacy.cshtml │ │ ├── Privacy.cshtml.cs │ │ ├── Shared │ │ │ ├── _Layout.cshtml │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── aspnetapp.csproj │ │ └── wwwroot │ │ ├── css │ │ └── site.css │ │ ├── favicon.ico │ │ ├── js │ │ └── site.js │ │ └── lib │ │ ├── bootstrap │ │ ├── LICENSE │ │ └── dist │ │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ └── bootstrap.min.js.map │ │ ├── jquery-validation-unobtrusive │ │ ├── LICENSE.txt │ │ ├── jquery.validate.unobtrusive.js │ │ └── jquery.validate.unobtrusive.min.js │ │ ├── jquery-validation │ │ ├── LICENSE.md │ │ └── dist │ │ │ ├── additional-methods.js │ │ │ ├── additional-methods.min.js │ │ │ ├── jquery.validate.js │ │ │ └── jquery.validate.min.js │ │ └── jquery │ │ ├── LICENSE.txt │ │ └── dist │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map ├── build-in-sdk-container.md ├── complexapp │ ├── .dockerignore │ ├── Dockerfile │ ├── README.md │ ├── complexapp.sln │ ├── complexapp │ │ ├── Program.cs │ │ └── complexapp.csproj │ ├── libbar │ │ ├── Bar.cs │ │ └── libbar.csproj │ ├── libfoo │ │ ├── Foo.cs │ │ └── libfoo.csproj │ └── tests │ │ ├── UnitTest1.cs │ │ └── tests.csproj ├── deploy-container-to-aci.md ├── dotnetapp │ ├── .dockerignore │ ├── Dockerfile │ ├── Dockerfile.alpine-arm64 │ ├── Dockerfile.alpine-x64 │ ├── Dockerfile.alpine-x64-slim │ ├── Dockerfile.debian-arm32 │ ├── Dockerfile.debian-arm64 │ ├── Dockerfile.debian-x64 │ ├── Dockerfile.debian-x64-slim │ ├── Dockerfile.nanoserver-x64 │ ├── Dockerfile.nanoserver-x64-slim │ ├── Dockerfile.ubuntu-arm32 │ ├── Dockerfile.ubuntu-arm64 │ ├── Dockerfile.ubuntu-x64 │ ├── Dockerfile.ubuntu-x64-slim │ ├── Dockerfile.windowsservercore-x64 │ ├── Dockerfile.windowsservercore-x64-slim │ ├── Program.cs │ ├── README.md │ └── dotnetapp.csproj ├── establishing-docker-environment.md ├── host-aspnetcore-https.md ├── push-image-to-acr.md ├── push-image-to-dockerhub.md ├── run-aspnetcore-https-development.md ├── run-in-sdk-container.md ├── run-tests-in-sdk-container.md ├── selecting-tags.md └── snippets │ ├── README.md │ ├── installing-dotnet.md │ ├── nuget-credentials.md │ └── using-system-drawing-common.md ├── src ├── aspnet │ ├── 2.1 │ │ ├── alpine3.12 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── bionic │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ │ └── Dockerfile │ │ ├── focal │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-20H2 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ └── stretch-slim │ │ │ ├── amd64 │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ └── Dockerfile │ ├── 3.1 │ │ ├── alpine3.12 │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── bionic │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── buster-slim │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── focal │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ └── nanoserver-20H2 │ │ │ └── amd64 │ │ │ └── Dockerfile │ ├── 5.0 │ │ ├── alpine3.12 │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── alpine3.13 │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── buster-slim │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── focal │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-20H2 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ └── windowsservercore-ltsc2019 │ │ │ └── amd64 │ │ │ └── Dockerfile │ └── 6.0 │ │ ├── alpine3.13 │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ │ ├── bullseye-slim │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ │ ├── focal │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ └── amd64 │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ └── amd64 │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ └── amd64 │ │ │ └── Dockerfile │ │ ├── nanoserver-20H2 │ │ └── amd64 │ │ │ └── Dockerfile │ │ └── windowsservercore-ltsc2019 │ │ └── amd64 │ │ └── Dockerfile ├── runtime-deps │ ├── 2.1 │ │ ├── alpine3.12 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── bionic │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ │ └── Dockerfile │ │ ├── focal │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ │ └── Dockerfile │ │ └── stretch-slim │ │ │ ├── amd64 │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ └── Dockerfile │ ├── 3.1 │ │ ├── alpine3.12 │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── bionic │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── buster-slim │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ └── focal │ │ │ ├── amd64 │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ └── Dockerfile │ ├── 5.0 │ │ └── alpine3.13 │ │ │ ├── amd64 │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ └── Dockerfile │ └── 6.0 │ │ └── bullseye-slim │ │ ├── amd64 │ │ └── Dockerfile │ │ ├── arm32v7 │ │ └── Dockerfile │ │ └── arm64v8 │ │ └── Dockerfile ├── runtime │ ├── 2.1 │ │ ├── alpine3.12 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── bionic │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ │ └── Dockerfile │ │ ├── focal │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-20H2 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ └── stretch-slim │ │ │ ├── amd64 │ │ │ └── Dockerfile │ │ │ └── arm32v7 │ │ │ └── Dockerfile │ ├── 3.1 │ │ ├── alpine3.12 │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── bionic │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── buster-slim │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── focal │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ └── nanoserver-20H2 │ │ │ └── amd64 │ │ │ └── Dockerfile │ ├── 5.0 │ │ ├── alpine3.12 │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── alpine3.13 │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── buster-slim │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── focal │ │ │ ├── amd64 │ │ │ │ └── Dockerfile │ │ │ ├── arm32v7 │ │ │ │ └── Dockerfile │ │ │ └── arm64v8 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ ├── nanoserver-20H2 │ │ │ └── amd64 │ │ │ │ └── Dockerfile │ │ └── windowsservercore-ltsc2019 │ │ │ └── amd64 │ │ │ └── Dockerfile │ └── 6.0 │ │ ├── alpine3.13 │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ │ ├── bullseye-slim │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ │ ├── focal │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ │ ├── nanoserver-1809 │ │ └── amd64 │ │ │ └── Dockerfile │ │ ├── nanoserver-1909 │ │ └── amd64 │ │ │ └── Dockerfile │ │ ├── nanoserver-2004 │ │ └── amd64 │ │ │ └── Dockerfile │ │ ├── nanoserver-20H2 │ │ └── amd64 │ │ │ └── Dockerfile │ │ └── windowsservercore-ltsc2019 │ │ └── amd64 │ │ └── Dockerfile └── sdk │ ├── 2.1 │ ├── alpine3.12 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── bionic │ │ ├── amd64 │ │ │ └── Dockerfile │ │ └── arm32v7 │ │ │ └── Dockerfile │ ├── focal │ │ ├── amd64 │ │ │ └── Dockerfile │ │ └── arm32v7 │ │ │ └── Dockerfile │ ├── nanoserver-1809 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-1909 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-2004 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-20H2 │ │ └── amd64 │ │ │ └── Dockerfile │ └── stretch │ │ ├── amd64 │ │ └── Dockerfile │ │ └── arm32v7 │ │ └── Dockerfile │ ├── 3.1 │ ├── alpine3.12 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── bionic │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ ├── buster │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ ├── focal │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ ├── nanoserver-1809 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-1909 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-2004 │ │ └── amd64 │ │ │ └── Dockerfile │ └── nanoserver-20H2 │ │ └── amd64 │ │ └── Dockerfile │ ├── 5.0 │ ├── alpine3.12 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── alpine3.13 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── buster-slim │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ ├── focal │ │ ├── amd64 │ │ │ └── Dockerfile │ │ ├── arm32v7 │ │ │ └── Dockerfile │ │ └── arm64v8 │ │ │ └── Dockerfile │ ├── nanoserver-1809 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-1909 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-2004 │ │ └── amd64 │ │ │ └── Dockerfile │ ├── nanoserver-20H2 │ │ └── amd64 │ │ │ └── Dockerfile │ └── windowsservercore-ltsc2019 │ │ └── amd64 │ │ └── Dockerfile │ └── 6.0 │ ├── alpine3.13 │ ├── amd64 │ │ └── Dockerfile │ ├── arm32v7 │ │ └── Dockerfile │ └── arm64v8 │ │ └── Dockerfile │ ├── bullseye-slim │ ├── amd64 │ │ └── Dockerfile │ ├── arm32v7 │ │ └── Dockerfile │ └── arm64v8 │ │ └── Dockerfile │ ├── focal │ ├── amd64 │ │ └── Dockerfile │ ├── arm32v7 │ │ └── Dockerfile │ └── arm64v8 │ │ └── Dockerfile │ ├── nanoserver-1809 │ └── amd64 │ │ └── Dockerfile │ ├── nanoserver-1909 │ └── amd64 │ │ └── Dockerfile │ ├── nanoserver-2004 │ └── amd64 │ │ └── Dockerfile │ ├── nanoserver-20H2 │ └── amd64 │ │ └── Dockerfile │ └── windowsservercore-ltsc2019 │ └── amd64 │ └── Dockerfile └── tests ├── Microsoft.DotNet.Docker.Tests ├── Arch.cs ├── AspnetImageTests.cs ├── AssemblyInfo.cs ├── CommonRuntimeImageTests.cs ├── Config.cs ├── DockerHelper.cs ├── DotNetImageType.cs ├── EnvironmentVariableInfo.cs ├── ExecuteHelper.cs ├── FileHelper.cs ├── GeneratedArtifactTests.cs ├── ImageData.cs ├── ImageScenarioVerifier.cs ├── ImageVersion.cs ├── LinuxImageTheoryAttribute.cs ├── Microsoft.DotNet.Docker.Tests.csproj ├── Microsoft.DotNet.Docker.Tests.sln ├── OS.cs ├── ProductImageData.cs ├── ProductImageTests.cs ├── RuntimeDepsImageTests.cs ├── RuntimeImageTests.cs ├── SampleImageData.cs ├── SampleImageTests.cs ├── SampleImageType.cs ├── SdkImageTests.cs ├── SkippableTheoryAttribute.cs ├── StringExtensions.cs ├── TestAppArtifacts │ ├── .dockerignore │ ├── Dockerfile.linux │ ├── Dockerfile.windows │ ├── NuGet.config │ └── NuGet.config.nightly └── TestData.cs ├── performance ├── ImageSize.nightly.linux.json ├── ImageSize.nightly.windows.json └── Validate-ImageSize.ps1 └── run-tests.ps1 /.dockerignore: -------------------------------------------------------------------------------- 1 | **/bin 2 | **/obj 3 | **/out 4 | **/.vscode 5 | **/.vs 6 | .dotnet 7 | .Microsoft.DotNet.ImageBuilder 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 💡 Feature request 3 | about: Suggest an idea for this project 4 | labels: 'enhancement' 5 | --- 6 | 7 | ### Describe the Problem 8 | 9 | 13 | 14 | ### Describe the Solution 15 | 16 | 17 | 18 | ### Additional Context 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Build output 2 | [Bb]in/ 3 | [Oo]bj/ 4 | [Oo]ut/ 5 | 6 | # cache for misc downloads 7 | artifacts/ 8 | 9 | # dotnet install directory 10 | .dotnet/ 11 | 12 | # Visual Studio 2015 cache/options directory 13 | .vs/ 14 | 15 | # Visual Studio Code cache/options directory 16 | .vscode/ 17 | 18 | # Visual Studio debug profile 19 | **/launchSettings.json 20 | 21 | # Test files 22 | *.trx 23 | 24 | # User-specific files 25 | *.suo 26 | *.user 27 | 28 | # ImageBuilder directory 29 | .Microsoft.DotNet.ImageBuilder 30 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the code of conduct defined by the Contributor Covenant 4 | to clarify expected behavior in our community. 5 | 6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 .NET Foundation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | The .NET Core and ASP.NET Core support policy, including supported versions can be found at the [.NET Core Support Policy Page](https://dotnet.microsoft.com/platform/support/policy/dotnet-core). 6 | 7 | ## Reporting a Vulnerability 8 | 9 | Security issues and bugs should be reported privately to the Microsoft Security Response Center (MSRC), either by emailing secure@microsoft.com or via the portal at https://msrc.microsoft.com. 10 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your 11 | original message. Further information, including the MSRC PGP key, can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/en-us/msrc/faqs-report-an-issue). 12 | 13 | Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty). 14 | 15 | Please do not open issues for anything you think might have a security implication. -------------------------------------------------------------------------------- /documentation/image-artifact-details-alpine-package-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ualehosaini/dotnet-docker/50f62bf83b5f267330d15b03ddbcdce1ff30a4ea/documentation/image-artifact-details-alpine-package-details.png -------------------------------------------------------------------------------- /documentation/image-artifact-details-alpine-package-search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ualehosaini/dotnet-docker/50f62bf83b5f267330d15b03ddbcdce1ff30a4ea/documentation/image-artifact-details-alpine-package-search.png -------------------------------------------------------------------------------- /documentation/scenarios/README.md: -------------------------------------------------------------------------------- 1 | # .NET with Docker Scenarios 2 | 3 | These scenarios contain tips and tricks, best practices, and samples of commonly used technology. They provide helpful demonstrations of solving commonly encountered issues. 4 | 5 | ## Scenarios 6 | 7 | * [Managing NuGet Credentials in Docker Scenarios](nuget-credentials.md) 8 | * [Installing .NET in a Dockerfile](installing-dotnet.md) 9 | * [Using the System.Drawing.Common Package in a Docker Container](using-system-drawing-common.md) 10 | 11 | ## Community 12 | 13 | You are invited to contribute new scenarios, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. 14 | 15 | Before you start to code, please read the [.NET contribution guidelines](https://github.com/dotnet/coreclr/blob/master/CONTRIBUTING.md). 16 | -------------------------------------------------------------------------------- /eng/common/Dockerfile.WithRepo: -------------------------------------------------------------------------------- 1 | # Use this Dockerfile to create an ImageBuilder image 2 | ARG IMAGE 3 | FROM $IMAGE 4 | 5 | WORKDIR /repo 6 | COPY . . 7 | -------------------------------------------------------------------------------- /eng/common/Get-BaseImageStatus.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | 3 | <# 4 | .SYNOPSIS 5 | Outputs the status of external base images referenced in the Dockerfiles. 6 | #> 7 | [cmdletbinding()] 8 | param( 9 | # Path to the manifest file to use 10 | [string] 11 | $Manifest = "manifest.json", 12 | 13 | # Architecture to filter Dockerfiles to 14 | [string] 15 | $Architecture = "*", 16 | 17 | # A value indicating whether to run the script continously 18 | [switch] 19 | $Continuous, 20 | 21 | # Number of seconds to wait between each iteration 22 | [int] 23 | $ContinuousDelay = 10 24 | ) 25 | 26 | Set-StrictMode -Version Latest 27 | 28 | $imageBuilderArgs = "getBaseImageStatus --manifest $Manifest --architecture $Architecture" 29 | if ($Continuous) { 30 | $imageBuilderArgs += " --continuous --continuous-delay $ContinuousDelay" 31 | } 32 | 33 | & "$PSScriptRoot/Invoke-ImageBuilder.ps1" -ImageBuilderArgs $imageBuilderArgs 34 | -------------------------------------------------------------------------------- /eng/common/Get-ImageBuilder.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | 3 | # Load common image names 4 | Get-Content $PSScriptRoot/templates/variables/docker-images.yml | 5 | Where-Object { $_.Trim() -notlike 'variables:' } | 6 | ForEach-Object { 7 | $parts = $_.Split(':', 2) 8 | Set-Variable -Name $parts[0].Trim() -Value $parts[1].Trim() -Scope Global 9 | } 10 | 11 | & docker inspect ${imageNames.imagebuilder} | Out-Null 12 | if (-not $?) { 13 | Write-Output "Pulling" 14 | & $PSScriptRoot/Invoke-WithRetry.ps1 "docker pull ${imageNames.imagebuilder}" 15 | } 16 | -------------------------------------------------------------------------------- /eng/common/Invoke-CleanupDocker.ps1: -------------------------------------------------------------------------------- 1 | Set-StrictMode -Version Latest 2 | $ErrorActionPreference = 'Stop' 3 | 4 | docker ps -a -q | ForEach-Object { docker rm -f $_ } 5 | 6 | docker volume prune -f 7 | 8 | # Preserve the tagged Windows base images and the common eng infra images (e.g. ImageBuilder) 9 | # to avoid the expense of having to repull continuously. 10 | $engInfraImages = Get-Content $PSScriptRoot/templates/variables/docker-images.yml | 11 | Where-Object { $_.Trim() -notlike 'variables:' } | 12 | ForEach-Object { $_.Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries)[1] } 13 | 14 | docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}"| 15 | Where-Object { 16 | $localImage = $_ 17 | $localImage.Contains(": ")` 18 | -Or -Not ($localImage.StartsWith("mcr.microsoft.com/windows")` 19 | -Or ($engInfraImages.Where({ $localImage.StartsWith($_) }, 'First').Count -gt 0)) } | 20 | ForEach-Object { $_.Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries)[1] } | 21 | Select-Object -Unique | 22 | ForEach-Object { docker rmi -f $_ } 23 | -------------------------------------------------------------------------------- /eng/common/Invoke-WithRetry.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | 3 | # Executes a command and retries if it fails. 4 | [cmdletbinding()] 5 | param ( 6 | [Parameter(Mandatory = $true)][string]$Cmd, 7 | [int]$Retries = 2, 8 | [int]$WaitFactor = 6 9 | ) 10 | 11 | Set-StrictMode -Version Latest 12 | $ErrorActionPreference = 'Stop' 13 | 14 | $count = 0 15 | $completed = $false 16 | 17 | Write-Output "Executing '$Cmd'" 18 | 19 | while (-not $completed) { 20 | Invoke-Expression $Cmd 21 | $exit = $LASTEXITCODE 22 | $count++ 23 | 24 | if ($exit -eq 0) { 25 | $completed = $true 26 | } 27 | else { 28 | if ($count -lt $Retries) { 29 | $wait = [Math]::Pow($WaitFactor, $count - 1) 30 | Write-Output "Retry $count/$Retries exited $exit, retrying in $wait seconds..." 31 | Start-Sleep $wait 32 | } 33 | else { 34 | Write-Output "Retry $count/$Retries exited $exit, no more retries left." 35 | throw "Failed to execute '$Cmd'" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /eng/common/pull-image.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Stop script on NZEC 4 | set -e 5 | # Stop script if unbound variable found (use ${var:-} if intentional) 6 | set -u 7 | 8 | say_err() { 9 | printf "%b\n" "Error: $1" >&2 10 | } 11 | 12 | # Executes a command and retries if it fails. 13 | execute() { 14 | local count=0 15 | until "$@"; do 16 | local exit=$? 17 | count=$(( $count + 1 )) 18 | if [ $count -lt $retries ]; then 19 | local wait=$(( waitFactor ** (( count - 1 )) )) 20 | echo "Retry $count/$retries exited $exit, retrying in $wait seconds..." 21 | sleep $wait 22 | else 23 | say_err "Retry $count/$retries exited $exit, no more retries left." 24 | return $exit 25 | fi 26 | done 27 | 28 | return 0 29 | } 30 | 31 | scriptName=$0 32 | retries=5 33 | waitFactor=6 34 | image=$1 35 | 36 | echo "Pulling Docker image $image" 37 | execute docker pull $image 38 | -------------------------------------------------------------------------------- /eng/common/templates/jobs/test-images-linux-client.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | name: null 3 | pool: {} 4 | matrix: {} 5 | testJobTimeout: 60 6 | preBuildValidation: false 7 | jobs: 8 | - job: ${{ parameters.name }} 9 | ${{ if eq(parameters.preBuildValidation, 'false') }}: 10 | condition: and(succeeded(), ${{ parameters.matrix }}) 11 | dependsOn: GenerateTestMatrix 12 | strategy: 13 | matrix: $[ ${{ parameters.matrix }} ] 14 | pool: ${{ parameters.pool }} 15 | timeoutInMinutes: ${{ parameters.testJobTimeout }} 16 | steps: 17 | - template: ../steps/test-images-linux-client.yml 18 | parameters: 19 | preBuildValidation: ${{ parameters.preBuildValidation }} 20 | -------------------------------------------------------------------------------- /eng/common/templates/jobs/test-images-windows-client.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | name: null 3 | pool: {} 4 | matrix: {} 5 | testJobTimeout: 60 6 | jobs: 7 | - job: ${{ parameters.name }} 8 | condition: and(succeeded(), ${{ parameters.matrix }}) 9 | dependsOn: GenerateTestMatrix 10 | pool: ${{ parameters.pool }} 11 | strategy: 12 | matrix: $[ ${{ parameters.matrix }} ] 13 | timeoutInMinutes: ${{ parameters.testJobTimeout }} 14 | steps: 15 | - template: ../steps/test-images-windows-client.yml 16 | -------------------------------------------------------------------------------- /eng/common/templates/steps/cleanup-docker-linux.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | ################################################################################ 3 | # Cleanup local Docker server 4 | ################################################################################ 5 | - script: docker stop $(docker ps -q) || true 6 | displayName: Stop Running Containers 7 | condition: always() 8 | continueOnError: true 9 | - script: docker system prune -a -f --volumes 10 | displayName: Cleanup Docker 11 | condition: always() 12 | continueOnError: true 13 | -------------------------------------------------------------------------------- /eng/common/templates/steps/cleanup-docker-windows.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | ################################################################################ 3 | # Cleanup Docker Resources 4 | ################################################################################ 5 | - powershell: $(engCommonPath)/Invoke-CleanupDocker.ps1 6 | displayName: Cleanup Docker Images 7 | condition: always() 8 | continueOnError: true 9 | - powershell: | 10 | if (Test-Path $(Build.BinariesDirectory)\.Microsoft.DotNet.ImageBuilder) { 11 | Remove-Item $(Build.BinariesDirectory)\.Microsoft.DotNet.ImageBuilder -Force -Recurse; 12 | } 13 | displayName: Cleanup Image Builder 14 | condition: always() 15 | continueOnError: true 16 | -------------------------------------------------------------------------------- /eng/common/templates/steps/download-build-artifact.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | targetPath: "" 3 | artifactName: "" 4 | condition: true 5 | 6 | steps: 7 | - task: DownloadPipelineArtifact@1 8 | inputs: 9 | buildType: specific 10 | project: $(System.TeamProject) 11 | pipline: $(System.DefinitionId) 12 | buildVersionToDownload: specific 13 | buildId: $(sourceBuildId) 14 | targetPath: ${{ parameters.targetPath }} 15 | artifactName: ${{ parameters.artifactName }} 16 | displayName: Download Build Artifact(s) 17 | condition: ${{ parameters.condition }} 18 | -------------------------------------------------------------------------------- /eng/common/templates/steps/publish-readmes.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | dryRunArg: "" 3 | condition: true 4 | 5 | steps: 6 | - script: > 7 | $(runImageBuilderCmd) publishMcrDocs 8 | --manifest '$(manifest)' 9 | --registry-override '$(acr.server)' 10 | '$(dotnetDockerBot.userName)' 11 | '$(dotnetDockerBot.email)' 12 | '$(BotAccount-dotnet-docker-bot-PAT)' 13 | '$(publicGitRepoUri)' 14 | ${{ parameters.dryRunArg }} 15 | $(manifestVariables) 16 | $(imageBuilder.queueArgs) 17 | name: PublishReadmes 18 | displayName: Publish Readmes 19 | condition: ${{ parameters.condition }} 20 | - template: wait-for-mcr-doc-ingestion.yml 21 | parameters: 22 | commitDigest: $(PublishReadmes.readmeCommitDigest) 23 | condition: and(${{ parameters.condition }}, ne(variables['PublishReadmes.readmeCommitDigest'], '')) 24 | dryRunArg: ${{ parameters.dryRunArg }} 25 | -------------------------------------------------------------------------------- /eng/common/templates/steps/set-image-info-path-var.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - powershell: > 3 | $buildRepoName = $env:BUILD_REPOSITORY_NAME.Replace("/", "-") 4 | 5 | # publicSourceBranch is not necessarily the working branch, it is the branch referenced in the readme Dockerfile source links 6 | if ($env:PUBLICSOURCEBRANCH) { 7 | $publicSourceBranch = $env:PUBLICSOURCEBRANCH 8 | } 9 | elseif (-not $env:MANIFEST.Contains("samples") -and ($env:BUILD_SOURCEBRANCHNAME -eq "nightly" -or $env:SYSTEM_PULLREQUEST_TARGETBRANCH -eq "nightly")) { 10 | $publicSourceBranch = "nightly" 11 | } 12 | else { 13 | $publicSourceBranch = "main" 14 | } 15 | 16 | $imageInfoVersionsPath = "build-info/docker/image-info.$buildRepoName-$publicSourceBranch$env:IMAGEINFOVARIANT.json" 17 | 18 | echo "##vso[task.setvariable variable=imageInfoVersionsPath]$imageInfoVersionsPath" 19 | displayName: Set Image Info Path Var 20 | -------------------------------------------------------------------------------- /eng/common/templates/steps/validate-branch.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - ${{ if eq(variables['System.TeamProject'], 'internal') }}: 3 | - script: | 4 | if [[ "$OFFICIALBRANCHES" != *\'$BUILD_SOURCEBRANCHNAME\'* && \ 5 | "$PUBLISHREPOPREFIX" == "public/" && \ 6 | "$OVERRIDEOFFICIALBRANCHVALIDATION" != "true" ]]; then 7 | echo "##vso[task.logissue type=error]Official builds must be done from an official branch: $OFFICIALBRANCHES" 8 | exit 1 9 | fi 10 | displayName: Validate Branch 11 | -------------------------------------------------------------------------------- /eng/common/templates/steps/validate-image-sizes.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | dockerClientOS: null 3 | architecture: "*" 4 | validationMode: "all" 5 | 6 | steps: 7 | - template: ${{ format('../steps/init-docker-{0}.yml', parameters.dockerClientOS) }} 8 | - powershell: > 9 | ./tests/performance/Validate-ImageSize.ps1 10 | -ImageBuilderCustomArgs "--architecture '${{ parameters.architecture }}'" 11 | -ValidationMode:${{ parameters.validationMode }} 12 | -PullImages 13 | displayName: Run Image Size Tests 14 | - template: ${{ format('../steps/cleanup-docker-{0}.yml', parameters.dockerClientOS) }} 15 | -------------------------------------------------------------------------------- /eng/common/templates/steps/wait-for-mcr-doc-ingestion.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | commitDigest: null 3 | condition: true 4 | dryRunArg: "" 5 | 6 | steps: 7 | - script: > 8 | $(runImageBuilderCmd) waitForMcrDocIngestion 9 | '${{ parameters.commitDigest }}' 10 | '$(mcrStatus.servicePrincipalName)' 11 | '$(app-DotnetDockerMcrStatusApi-client-secret)' 12 | '$(mcrStatus.servicePrincipalTenant)' 13 | --timeout '$(mcrDocIngestionTimeout)' 14 | ${{ parameters.dryRunArg }} 15 | displayName: Wait for MCR Doc Ingestion 16 | condition: and(${{ parameters.condition }}, eq(variables['waitForIngestionEnabled'], 'true')) 17 | -------------------------------------------------------------------------------- /eng/common/templates/steps/wait-for-mcr-image-ingestion.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | imageInfoPath: null 3 | minQueueTime: null 4 | condition: true 5 | dryRunArg: "" 6 | 7 | steps: 8 | - script: > 9 | $(runImageBuilderCmd) waitForMcrImageIngestion 10 | '${{ parameters.imageInfoPath }}' 11 | '$(mcrStatus.servicePrincipalName)' 12 | '$(app-DotnetDockerMcrStatusApi-client-secret)' 13 | '$(mcrStatus.servicePrincipalTenant)' 14 | --manifest '$(manifest)' 15 | --min-queue-time '${{ parameters.minQueueTime }}' 16 | --timeout '$(mcrImageIngestionTimeout)' 17 | $(manifestVariables) 18 | ${{ parameters.dryRunArg }} 19 | displayName: Wait for Image Ingestion 20 | condition: and(${{ parameters.condition }}, eq(variables['waitForIngestionEnabled'], 'true')) 21 | -------------------------------------------------------------------------------- /eng/common/templates/variables/common-paths.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | engCommonRelativePath: eng/common 3 | engCommonPath: $(Build.Repository.LocalPath)/$(engCommonRelativePath) 4 | engPath: $(Build.Repository.LocalPath)/eng 5 | testScriptPath: ./tests/run-tests.ps1 6 | -------------------------------------------------------------------------------- /eng/common/templates/variables/common.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - template: docker-images.yml 3 | - template: common-paths.yml 4 | - name: stagingRepoPrefix 5 | value: build-staging/$(sourceBuildId)/ 6 | - name: publishReadme 7 | value: true 8 | - name: skipComponentGovernanceDetection 9 | value: true 10 | - name: build.imageBuilderDockerRunExtraOptions 11 | value: "" 12 | - name: imageBuilderDockerRunExtraOptions 13 | value: "" 14 | - name: productVersionComponents 15 | value: 2 16 | - name: imageInfoVariant 17 | value: "" 18 | - name: manifestVariables 19 | value: "" 20 | - name: defaultLinuxAmd64PoolImage 21 | value: ubuntu-latest 22 | - name: mcrImageIngestionTimeout 23 | value: "00:20:00" 24 | - name: mcrDocIngestionTimeout 25 | value: "00:05:00" 26 | - name: officialBranches 27 | # list multiple branches as "'branch1', 'branch2', etc." 28 | value: "'main'" 29 | 30 | - ${{ if eq(variables['System.TeamProject'], 'internal') }}: 31 | - group: DotNet-Docker-Common 32 | - group: DotNet-Docker-Secrets 33 | -------------------------------------------------------------------------------- /eng/common/templates/variables/docker-images.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | imageNames.imageBuilder: mcr.microsoft.com/dotnet-buildtools/image-builder:999010 3 | imageNames.imageBuilder.withrepo: imagebuilder-withrepo:$(Build.BuildId)-$(System.JobId) 4 | imageNames.testRunner: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-buster-slim-docker-testrunner-974165 5 | imageNames.testRunner.withrepo: testrunner-withrepo:$(Build.BuildId)-$(System.JobId) 6 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/Get-GeneratedDockerfiles.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | param( 3 | [switch]$Validate 4 | ) 5 | 6 | if ($Validate) { 7 | $customImageBuilderArgs = " --validate" 8 | } 9 | 10 | $repoRoot = (Get-Item "$PSScriptRoot").Parent.Parent.FullName 11 | 12 | $onDockerfilesGenerated = { 13 | param($ContainerName) 14 | 15 | if (-Not $Validate) { 16 | Exec "docker cp ${ContainerName}:/repo/src $repoRoot" 17 | } 18 | } 19 | 20 | & $PSScriptRoot/../common/Invoke-ImageBuilder.ps1 ` 21 | -ImageBuilderArgs "generateDockerfiles --architecture '*' --os-type '*'$customImageBuilderArgs" ` 22 | -OnCommandExecuted $onDockerfilesGenerated 23 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/2.1/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-{{OS_VERSION}} 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNETCORE_VERSION={{VARIABLES["aspnet|2.1|build-version"]}} 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-musl-x64.tar.gz \ 8 | && aspnetcore_sha512='{{VARIABLES["aspnet|2.1|linux-musl|x64|sha"]}}' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 12 | && rm aspnetcore.tar.gz \ 13 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 14 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/2.1/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-{{OS_VERSION}}{{if ARCH_VERSIONED != "amd64":{{ARCH_TAG_SUFFIX}}}} 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install ASP.NET Core 10 | ENV ASPNETCORE_VERSION={{VARIABLES["aspnet|2.1|build-version"]}} 11 | 12 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-{{ARCH_SHORT}}.tar.gz \ 13 | && aspnetcore_sha512='{{VARIABLES[cat("aspnet|2.1|linux|", ARCH_SHORT, "|sha")]}}' \ 14 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 17 | && rm aspnetcore.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/3.1/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-{{OS_VERSION}}{{if ARCH_VERSIONED != "amd64":{{ARCH_TAG_SUFFIX}}}} 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version={{VARIABLES["aspnet|3.1|build-version"]}} \ 6 | && wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-musl-{{ARCH_SHORT}}.tar.gz \ 7 | && aspnetcore_sha512='{{VARIABLES[cat("aspnet|3.1|linux-musl|", ARCH_SHORT, "|sha")]}}' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/3.1/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-{{OS_VERSION}}{{if ARCH_VERSIONED != "amd64":{{ARCH_TAG_SUFFIX}}}} 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version={{VARIABLES["aspnet|3.1|build-version"]}} \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-{{ARCH_SHORT}}.tar.gz \ 7 | && aspnetcore_sha512='{{VARIABLES[cat("aspnet|3.1|linux|", ARCH_SHORT, "|sha")]}}' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/3.1/Dockerfile.nanoserver: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | ARG REPO=mcr.microsoft.com/dotnet/runtime 4 | 5 | # Installer image 6 | FROM mcr.microsoft.com/windows/servercore:{{OS_VERSION_NUMBER}}-amd64 AS installer 7 | 8 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] 9 | 10 | # Install ASP.NET Core Runtime 11 | RUN $aspnetcore_version = '{{VARIABLES["aspnet|3.1|build-version"]}}'; ` 12 | Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-win-x64.zip; ` 13 | $aspnetcore_sha512 = '{{VARIABLES["aspnet|3.1|win|x64|sha"]}}'; ` 14 | if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` 15 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 16 | exit 1; ` 17 | }; ` 18 | ` 19 | mkdir dotnet/shared/Microsoft.AspNetCore.App; ` 20 | tar -C dotnet -oxzf aspnetcore.zip ./shared/Microsoft.AspNetCore.App; ` 21 | Remove-Item -Force aspnetcore.zip 22 | 23 | 24 | # Runtime image 25 | FROM $REPO:3.1-{{OS_VERSION}} 26 | 27 | COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] 28 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/5.0/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:5.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION={{VARIABLES["aspnet|5.0|build-version"]}} 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-{{ARCH_SHORT}}.tar.gz \ 8 | && aspnetcore_sha512='{{VARIABLES[cat("aspnet|5.0|linux-musl|", ARCH_SHORT, "|sha")]}}' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/5.0/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION={{VARIABLES["aspnet|5.0|build-version"]}} 3 | 4 | # Installer image 5 | FROM {{ARCH_VERSIONED}}/buildpack-deps:{{OS_VERSION_BASE}}-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-{{ARCH_SHORT}}.tar.gz \ 10 | && aspnetcore_sha512='{{VARIABLES[cat("aspnet|5.0|linux|", ARCH_SHORT, "|sha")]}}' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:5.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/5.0/Dockerfile.windowsservercore: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | ARG REPO=mcr.microsoft.com/dotnet/runtime 4 | FROM $REPO:5.0-{{OS_VERSION}} 5 | 6 | ENV ASPNET_VERSION={{VARIABLES["aspnet|5.0|build-version"]}} 7 | 8 | RUN powershell -Command ` 9 | $ErrorActionPreference = 'Stop'; ` 10 | $ProgressPreference = 'SilentlyContinue'; ` 11 | ` 12 | # Install ASP.NET Core Runtime 13 | Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$Env:ASPNET_VERSION/aspnetcore-runtime-$Env:ASPNET_VERSION-win-x64.zip; ` 14 | $aspnetcore_sha512 = '{{VARIABLES["aspnet|5.0|win|x64|sha"]}}'; ` 15 | if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` 16 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 17 | exit 1; ` 18 | }; ` 19 | ` 20 | tar -C $Env:ProgramFiles\dotnet -oxzf aspnetcore.zip ./shared/Microsoft.AspNetCore.App; ` 21 | Remove-Item -Force aspnetcore.zip 22 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-{{ARCH_SHORT}}.tar.gz \ 8 | && aspnetcore_sha512='{{VARIABLES[cat("aspnet|6.0|linux-musl|", ARCH_SHORT, "|sha")]}}' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} 3 | 4 | # Installer image 5 | FROM {{ARCH_VERSIONED}}/buildpack-deps:{{OS_VERSION_BASE}}-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-{{ARCH_SHORT}}.tar.gz \ 10 | && aspnetcore_sha512='{{VARIABLES[cat("aspnet|6.0|linux|", ARCH_SHORT, "|sha")]}}' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | ARG REPO=mcr.microsoft.com/dotnet/runtime 4 | FROM $REPO:6.0-{{OS_VERSION}} 5 | 6 | ENV ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} 7 | 8 | RUN powershell -Command ` 9 | $ErrorActionPreference = 'Stop'; ` 10 | $ProgressPreference = 'SilentlyContinue'; ` 11 | ` 12 | # Install ASP.NET Core Runtime 13 | Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$Env:ASPNET_VERSION/aspnetcore-runtime-$Env:ASPNET_VERSION-win-x64.zip; ` 14 | $aspnetcore_sha512 = '{{VARIABLES["aspnet|6.0|win|x64|sha"]}}'; ` 15 | if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` 16 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 17 | exit 1; ` 18 | }; ` 19 | ` 20 | tar -C $Env:ProgramFiles\dotnet -oxzf aspnetcore.zip ./shared/Microsoft.AspNetCore.App; ` 21 | Remove-Item -Force aspnetcore.zip 22 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime-deps/2.1/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | FROM {{ARCH_VERSIONED}}/alpine:{{OS_VERSION_NUMBER}} 2 | 3 | RUN apk add --no-cache \ 4 | ca-certificates \ 5 | \ 6 | # .NET Core dependencies 7 | krb5-libs \ 8 | libgcc \ 9 | libintl \ 10 | libssl1.1 \ 11 | libstdc++ \ 12 | lttng-ust \ 13 | tzdata \ 14 | userspace-rcu \ 15 | zlib 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true \ 22 | # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) 23 | DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true 24 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime-deps/2.1/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | FROM {{ARCH_VERSIONED}}/{{if OS_VERSION = "stretch-slim":debian^else:ubuntu}}:{{OS_VERSION}} 2 | 3 | RUN apt-get update \ 4 | &&{{if OS_VERSION = "focal": DEBIAN_FRONTEND=noninteractive}} apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu{{if OS_VERSION = "bionic":60^elif OS_VERSION = "focal":66^elif OS_VERSION = "stretch-slim":57}} \ 12 | liblttng-ust0 \ 13 | libssl{{if OS_VERSION = "bionic":1.0.0^elif OS_VERSION = "focal":1.1^elif OS_VERSION = "stretch-slim":1.0.2}} \ 14 | libstdc++6 \ 15 | zlib1g \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV \ 19 | # Configure web servers to bind to port 80 when present 20 | ASPNETCORE_URLS=http://+:80 \ 21 | # Enable detection of running in a container 22 | DOTNET_RUNNING_IN_CONTAINER=true 23 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime-deps/3.1/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | FROM {{ARCH_VERSIONED}}/alpine:{{OS_VERSION_NUMBER}} 2 | 3 | RUN apk add --no-cache \ 4 | ca-certificates \ 5 | \ 6 | # .NET Core dependencies 7 | krb5-libs \ 8 | libgcc \ 9 | libintl \ 10 | libssl1.1 \ 11 | libstdc++ \ 12 | zlib 13 | 14 | ENV \ 15 | # Configure web servers to bind to port 80 when present 16 | ASPNETCORE_URLS=http://+:80 \ 17 | # Enable detection of running in a container 18 | DOTNET_RUNNING_IN_CONTAINER=true \ 19 | # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) 20 | DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true 21 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime-deps/3.1/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | FROM {{ARCH_VERSIONED}}/{{if OS_VERSION = "buster-slim" || OS_VERSION = "bullseye-slim":debian^else:ubuntu}}:{{OS_VERSION}} 2 | 3 | RUN apt-get update \ 4 | &&{{if OS_VERSION = "focal": DEBIAN_FRONTEND=noninteractive}} apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu{{if OS_VERSION = "bionic":60^elif OS_VERSION = "buster-slim":63^elif OS_VERSION = "focal":66^elif OS_VERSION = "bullseye-slim":67}} \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/2.1/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-{{OS_VERSION}} 3 | 4 | # Install .NET Core 5 | ENV DOTNET_VERSION={{VARIABLES["runtime|2.1|build-version"]}} 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ 8 | && dotnet_sha512='{{VARIABLES["runtime|2.1|linux-musl|x64|sha"]}}' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/2.1/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-{{OS_VERSION}}{{if ARCH_VERSIONED != "amd64":{{ARCH_TAG_SUFFIX}}}} 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | ENV DOTNET_VERSION={{VARIABLES["runtime|2.1|build-version"]}} 11 | 12 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-{{ARCH_SHORT}}.tar.gz \ 13 | && dotnet_sha512='{{VARIABLES[cat("runtime|2.1|linux|", ARCH_SHORT, "|sha")]}}' \ 14 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ 17 | && rm dotnet.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/3.1/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-{{OS_VERSION}}{{if ARCH_VERSIONED != "amd64":{{ARCH_TAG_SUFFIX}}}} 3 | 4 | # Install .NET Core 5 | RUN dotnet_version={{VARIABLES["runtime|3.1|build-version"]}} \ 6 | && wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-musl-{{ARCH_SHORT}}.tar.gz \ 7 | && dotnet_sha512='{{VARIABLES[cat("runtime|3.1|linux-musl|", ARCH_SHORT, "|sha")]}}' \ 8 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 9 | && mkdir -p /usr/share/dotnet \ 10 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 11 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 12 | && rm dotnet.tar.gz 13 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/3.1/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-{{OS_VERSION}}{{if ARCH_VERSIONED != "amd64":{{ARCH_TAG_SUFFIX}}}} 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version={{VARIABLES["runtime|3.1|build-version"]}} \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-{{ARCH_SHORT}}.tar.gz \ 12 | && dotnet_sha512='{{VARIABLES[cat("runtime|3.1|linux|", ARCH_SHORT, "|sha")]}}' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/5.0/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:5.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION={{VARIABLES["runtime|5.0|build-version"]}} 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-{{ARCH_SHORT}}.tar.gz \ 8 | && dotnet_sha512='{{VARIABLES[cat("runtime|5.0|linux-musl|", ARCH_SHORT, "|sha")]}}' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/5.0/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION={{VARIABLES["runtime|5.0|build-version"]}} 3 | 4 | # Installer image 5 | FROM {{ARCH_VERSIONED}}/buildpack-deps:{{OS_VERSION_BASE}}-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-{{ARCH_SHORT}}.tar.gz \ 10 | && dotnet_sha512='{{VARIABLES[cat("runtime|5.0|linux|", ARCH_SHORT, "|sha")]}}' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:5.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/5.0/Dockerfile.windowsservercore: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | FROM mcr.microsoft.com/windows/servercore:{{OS_VERSION_NUMBER}}-amd64 4 | 5 | ENV ` 6 | # Configure web servers to bind to port 80 when present 7 | ASPNETCORE_URLS=http://+:80 ` 8 | # Enable detection of running in a container 9 | DOTNET_RUNNING_IN_CONTAINER=true ` 10 | DOTNET_VERSION={{VARIABLES["runtime|5.0|build-version"]}} 11 | 12 | RUN powershell -Command ` 13 | $ErrorActionPreference = 'Stop'; ` 14 | $ProgressPreference = 'SilentlyContinue'; ` 15 | ` 16 | # Install .NET 17 | Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Runtime/$Env:DOTNET_VERSION/dotnet-runtime-$Env:DOTNET_VERSION-win-x64.zip; ` 18 | $dotnet_sha512 = '{{VARIABLES["runtime|5.0|win|x64|sha"]}}'; ` 19 | if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` 20 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 21 | exit 1; ` 22 | }; ` 23 | ` 24 | mkdir $Env:ProgramFiles\dotnet; ` 25 | tar -C $Env:ProgramFiles\dotnet -oxzf dotnet.zip; ` 26 | Remove-Item -Force dotnet.zip 27 | 28 | RUN setx /M PATH "%PATH%;C:\Program Files\dotnet" 29 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/6.0/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION={{VARIABLES["runtime|6.0|build-version"]}} 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-{{ARCH_SHORT}}.tar.gz \ 8 | && dotnet_sha512='{{VARIABLES[cat("runtime|6.0|linux-musl|", ARCH_SHORT, "|sha")]}}' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/6.0/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION={{VARIABLES["runtime|6.0|build-version"]}} 3 | 4 | # Installer image 5 | FROM {{ARCH_VERSIONED}}/buildpack-deps:{{OS_VERSION_BASE}}-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-{{ARCH_SHORT}}.tar.gz \ 10 | && dotnet_sha512='{{VARIABLES[cat("runtime|6.0|linux|", ARCH_SHORT, "|sha")]}}' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/runtime/6.0/Dockerfile.windowsservercore: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | FROM mcr.microsoft.com/windows/servercore:{{OS_VERSION_NUMBER}}-amd64 4 | 5 | ENV ` 6 | # Configure web servers to bind to port 80 when present 7 | ASPNETCORE_URLS=http://+:80 ` 8 | # Enable detection of running in a container 9 | DOTNET_RUNNING_IN_CONTAINER=true ` 10 | DOTNET_VERSION={{VARIABLES["runtime|6.0|build-version"]}} 11 | 12 | RUN powershell -Command ` 13 | $ErrorActionPreference = 'Stop'; ` 14 | $ProgressPreference = 'SilentlyContinue'; ` 15 | ` 16 | # Install .NET 17 | Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Runtime/$Env:DOTNET_VERSION/dotnet-runtime-$Env:DOTNET_VERSION-win-x64.zip; ` 18 | $dotnet_sha512 = '{{VARIABLES["runtime|6.0|win|x64|sha"]}}'; ` 19 | if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` 20 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 21 | exit 1; ` 22 | }; ` 23 | ` 24 | mkdir $Env:ProgramFiles\dotnet; ` 25 | tar -C $Env:ProgramFiles\dotnet -oxzf dotnet.zip; ` 26 | Remove-Item -Force dotnet.zip 27 | 28 | RUN setx /M PATH "%PATH%;C:\Program Files\dotnet" 29 | -------------------------------------------------------------------------------- /eng/dockerfile-templates/sdk/2.1/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-{{OS_VERSION}} 3 | 4 | # Disable the invariant mode (set in base image) 5 | RUN apk add --no-cache icu-libs 6 | 7 | ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ 8 | LC_ALL=en_US.UTF-8 \ 9 | LANG=en_US.UTF-8 10 | 11 | # Install .NET Core SDK 12 | ENV DOTNET_SDK_VERSION={{VARIABLES["sdk|2.1|build-version"]}} 13 | 14 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-x64.tar.gz \ 15 | && dotnet_sha512='{{VARIABLES["sdk|2.1|linux-musl|x64|sha"]}}' \ 16 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 17 | && mkdir -p /usr/share/dotnet \ 18 | && tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ 19 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 20 | && rm dotnet.tar.gz 21 | 22 | ENV \ 23 | # Enable correct mode for dotnet watch (only mode supported in a container) 24 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 25 | # Skip extraction of XML docs - generally not useful within an image/container - helps performance 26 | NUGET_XMLDOC_MODE=skip 27 | 28 | # Trigger first run experience by running arbitrary cmd to populate local package cache 29 | RUN dotnet help 30 | -------------------------------------------------------------------------------- /eng/get-drop-versions-monitor.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Stop script on NZEC 4 | set -e 5 | # Stop script if unbound variable found (use ${var:-} if intentional) 6 | set -u 7 | 8 | curl -SLo dotnet-monitor.nupkg.version https://aka.ms/dotnet/diagnostics/monitor5.0/dotnet-monitor.nupkg.version 9 | 10 | # Read version file and remove newlines 11 | monitorVer=$(tr -d '\r\n' < dotnet-monitor.nupkg.version) 12 | 13 | rm dotnet-monitor.nupkg.version 14 | 15 | echo "##vso[task.setvariable variable=monitorVer]$monitorVer" 16 | -------------------------------------------------------------------------------- /eng/mcr-tags-metadata-templates/samples-tags.yml: -------------------------------------------------------------------------------- 1 | $(McrTagsYmlRepo:samples) 2 | $(McrTagsYmlTagGroup:dotnetapp-buster-slim-amd64) 3 | $(McrTagsYmlTagGroup:aspnetapp-buster-slim-amd64) 4 | $(McrTagsYmlTagGroup:dotnetapp-buster-slim-arm32v7) 5 | $(McrTagsYmlTagGroup:aspnetapp-buster-slim-arm32v7) 6 | $(McrTagsYmlTagGroup:dotnetapp-buster-slim-arm64v8) 7 | $(McrTagsYmlTagGroup:aspnetapp-buster-slim-arm64v8) 8 | $(McrTagsYmlTagGroup:dotnetapp-nanoserver-20H2) 9 | $(McrTagsYmlTagGroup:aspnetapp-nanoserver-20H2) 10 | $(McrTagsYmlTagGroup:dotnetapp-nanoserver-2004) 11 | $(McrTagsYmlTagGroup:aspnetapp-nanoserver-2004) 12 | $(McrTagsYmlTagGroup:dotnetapp-nanoserver-1909) 13 | $(McrTagsYmlTagGroup:aspnetapp-nanoserver-1909) 14 | $(McrTagsYmlTagGroup:dotnetapp-nanoserver-1809) 15 | $(McrTagsYmlTagGroup:aspnetapp-nanoserver-1809) 16 | -------------------------------------------------------------------------------- /eng/pipelines/README.md: -------------------------------------------------------------------------------- 1 | The contents of the `pipelines` folder are used by the .NET Core engineering infrastructure to build and publish the images. 2 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-nightly-pr-no-cache.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: 3 | branches: 4 | include: 5 | - nightly 6 | paths: 7 | include: 8 | - eng/* 9 | - tests/* 10 | 11 | resources: 12 | repositories: 13 | - repository: VersionsRepo 14 | type: github 15 | endpoint: dotnet 16 | name: dotnet/versions 17 | 18 | variables: 19 | - template: variables/core.yml 20 | 21 | stages: 22 | - template: ../common/templates/stages/build-test-publish-repo.yml 23 | parameters: 24 | buildMatrixType: platformVersionedOs 25 | buildMatrixCustomBuildLegGroupArgs: --custom-build-leg-group pr-build --custom-build-leg-group test-dependencies 26 | noCache: true 27 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-nightly-pr.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: 3 | branches: 4 | include: 5 | - nightly 6 | - feature/* 7 | paths: 8 | include: 9 | - manifest.json 10 | - manifest.versions.json 11 | - eng/* 12 | - src/* 13 | - tests/* 14 | 15 | resources: 16 | repositories: 17 | - repository: VersionsRepo 18 | type: github 19 | endpoint: dotnet 20 | name: dotnet/versions 21 | 22 | variables: 23 | - template: variables/core.yml 24 | 25 | stages: 26 | - template: ../common/templates/stages/build-test-publish-repo.yml 27 | parameters: 28 | buildMatrixType: platformVersionedOs 29 | buildMatrixCustomBuildLegGroupArgs: --custom-build-leg-group pr-build --custom-build-leg-group test-dependencies 30 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-nightly.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | batch: true 3 | branches: 4 | include: 5 | - nightly 6 | paths: 7 | include: 8 | - manifest.json 9 | - manifest.versions.json 10 | - src/* 11 | pr: none 12 | 13 | variables: 14 | - template: variables/core.yml 15 | - name: officialBranches 16 | value: "'nightly'" 17 | 18 | stages: 19 | - template: ../common/templates/stages/build-test-publish-repo.yml 20 | parameters: 21 | testMatrixCustomBuildLegGroupArgs: --custom-build-leg-group test-dependencies 22 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-pr.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: 3 | branches: 4 | include: 5 | - main 6 | - master 7 | paths: 8 | include: 9 | - manifest.json 10 | - manifest.versions.json 11 | - eng/* 12 | - src/* 13 | - tests/* 14 | 15 | resources: 16 | repositories: 17 | - repository: VersionsRepo 18 | type: github 19 | endpoint: dotnet 20 | name: dotnet/versions 21 | 22 | variables: 23 | - template: variables/core.yml 24 | 25 | stages: 26 | - template: ../common/templates/stages/build-test-publish-repo.yml 27 | parameters: 28 | buildMatrixType: platformVersionedOs 29 | buildMatrixCustomBuildLegGroupArgs: --custom-build-leg-group pr-build --custom-build-leg-group test-dependencies 30 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-samples-pr.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: 3 | branches: 4 | include: 5 | - main 6 | - master 7 | - nightly 8 | paths: 9 | include: 10 | - manifest.samples.json 11 | - eng/* 12 | - samples/* 13 | - tests/* 14 | 15 | resources: 16 | repositories: 17 | - repository: VersionsRepo 18 | type: github 19 | endpoint: dotnet 20 | name: dotnet/versions 21 | 22 | variables: 23 | - template: variables/samples.yml 24 | 25 | stages: 26 | - template: ../common/templates/stages/build-test-publish-repo.yml 27 | parameters: 28 | buildMatrixType: platformVersionedOs 29 | buildMatrixCustomBuildLegGroupArgs: --custom-build-leg-group pr-build 30 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-samples.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: none 3 | 4 | variables: 5 | - template: variables/samples.yml 6 | 7 | stages: 8 | - template: ../common/templates/stages/build-test-publish-repo.yml 9 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-size-validation-pr.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: 3 | branches: 4 | include: 5 | - nightly 6 | paths: 7 | exclude: 8 | - .github/* 9 | - documentation/* 10 | - README* 11 | - samples/* 12 | 13 | variables: 14 | - template: variables/common.yml 15 | 16 | jobs: 17 | - template: ../common/templates/jobs/validate-image-sizes.yml 18 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core-size-validation.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: none 3 | 4 | schedules: 5 | - cron: "0 5 * * 1" 6 | displayName: Weekly build 7 | branches: 8 | include: 9 | - nightly 10 | always: true 11 | variables: 12 | - template: variables/common.yml 13 | 14 | jobs: 15 | - template: ../common/templates/jobs/validate-image-sizes.yml 16 | -------------------------------------------------------------------------------- /eng/pipelines/dotnet-core.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: none 3 | 4 | variables: 5 | - template: variables/core.yml 6 | 7 | stages: 8 | - template: ../common/templates/stages/build-test-publish-repo.yml 9 | parameters: 10 | testMatrixCustomBuildLegGroupArgs: --custom-build-leg-group test-dependencies 11 | -------------------------------------------------------------------------------- /eng/pipelines/update-readmes.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: none 3 | variables: 4 | - template: variables/common.yml 5 | - name: manifest 6 | value: manifest.json 7 | jobs: 8 | - job: UpdateReadmes 9 | pool: Hosted Ubuntu 1604 10 | steps: 11 | - template: ../common/templates/steps/init-docker-linux.yml 12 | - template: ../common/templates/steps/publish-readmes.yml 13 | - template: ../common/templates/steps/cleanup-docker-linux.yml 14 | -------------------------------------------------------------------------------- /eng/pipelines/variables/common.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - template: ../../common/templates/variables/common.yml 3 | - name: publicGitRepoUri 4 | value: https://github.com/dotnet/dotnet-docker 5 | - name: productVersionComponents 6 | value: 2 7 | - name: testResultsDirectory 8 | value: tests/Microsoft.DotNet.Docker.Tests/TestResults/ 9 | -------------------------------------------------------------------------------- /eng/pipelines/variables/core.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - template: common.yml 3 | - name: manifest 4 | value: manifest.json 5 | -------------------------------------------------------------------------------- /eng/pipelines/variables/samples.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - template: common.yml 3 | - name: manifest 4 | value: manifest.samples.json 5 | - name: repoTestArgs 6 | value: -TestCategories sample 7 | - name: imageInfoVariant 8 | value: "-samples" 9 | -------------------------------------------------------------------------------- /eng/pipelines/wait-for-ingestion.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: none 3 | 4 | variables: 5 | - template: variables/common.yml 6 | jobs: 7 | - template: ../common/templates/jobs/wait-for-ingestion.yml 8 | -------------------------------------------------------------------------------- /eng/readme-templates/About.aspnet.md: -------------------------------------------------------------------------------- 1 | This image contains the ASP.NET Core and .NET runtimes and libraries and is optimized for running ASP.NET Core apps in production. 2 | -------------------------------------------------------------------------------- /eng/readme-templates/About.monitor.md: -------------------------------------------------------------------------------- 1 | This image contains the .NET Monitor tool. 2 | 3 | Use this image as a sidecar container to collect diagnostic information from other containers running .NET Core 3.1 or later processes. 4 | -------------------------------------------------------------------------------- /eng/readme-templates/About.runtime-deps.md: -------------------------------------------------------------------------------- 1 | This image contains the native dependencies needed by .NET. It does not include .NET. It is for [self-contained](https://docs.microsoft.com/dotnet/articles/core/deploying/index) applications. 2 | -------------------------------------------------------------------------------- /eng/readme-templates/About.runtime.md: -------------------------------------------------------------------------------- 1 | This image contains the .NET runtimes and libraries and is optimized for running .NET apps in production. 2 | -------------------------------------------------------------------------------- /eng/readme-templates/About.samples.md: -------------------------------------------------------------------------------- 1 | These images contain sample .NET and ASP.NET Core applications. 2 | -------------------------------------------------------------------------------- /eng/readme-templates/About.sdk.md: -------------------------------------------------------------------------------- 1 | This image contains the .NET SDK which is comprised of three parts: 2 | 3 | 1. .NET CLI 4 | 1. .NET runtime 5 | 1. ASP.NET Core 6 | 7 | Use this image for your development process (developing, building and testing applications). 8 | -------------------------------------------------------------------------------- /eng/readme-templates/Use.aspnet.md: -------------------------------------------------------------------------------- 1 | ## Container sample: Run a web application 2 | 3 | You can quickly run a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/), based on the [ASP.NET Core sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/aspnetapp/README.md). 4 | 5 | Type the following command to run a sample web application: 6 | 7 | ```console 8 | docker run -it --rm -p 8000:80 --name aspnetcore_sample mcr.microsoft.com/dotnet/samples:aspnetapp 9 | ``` 10 | 11 | After the application starts, navigate to `http://localhost:8000` in your web browser. 12 | 13 | See [Hosting ASP.NET Core Images with Docker over HTTPS](https://github.com/dotnet/dotnet-docker/blob/master/samples/host-aspnetcore-https.md) to use HTTPS with this image. 14 | -------------------------------------------------------------------------------- /eng/readme-templates/Use.md: -------------------------------------------------------------------------------- 1 | ## Container sample: Run a simple application 2 | 3 | You can quickly run a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/), based on the [.NET console sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/README.md). 4 | 5 | Type the following command to run a sample console application: 6 | 7 | ```console 8 | docker run --rm mcr.microsoft.com/dotnet/samples 9 | ``` 10 | 11 | ## Container sample: Run a web application 12 | 13 | You can quickly run a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/), based on the [ASP.NET Core sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/aspnetapp/README.md). 14 | 15 | Type the following command to run a sample web application: 16 | 17 | ```console 18 | docker run -it --rm -p 8000:80 --name aspnetcore_sample mcr.microsoft.com/dotnet/samples:aspnetapp 19 | ``` 20 | 21 | After the application starts, navigate to `http://localhost:8000` in your web browser. 22 | 23 | See [Hosting ASP.NET Core Images with Docker over HTTPS](https://github.com/dotnet/dotnet-docker/blob/master/samples/host-aspnetcore-https.md) to use HTTPS with this image. 24 | -------------------------------------------------------------------------------- /eng/readme-templates/Use.monitor.md: -------------------------------------------------------------------------------- 1 | TBD 2 | -------------------------------------------------------------------------------- /eng/readme-templates/Use.runtime-deps.md: -------------------------------------------------------------------------------- 1 | * [.NET self-contained Sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/dotnet-docker-selfcontained.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/Dockerfile.debian-x64-selfcontained) builds and runs an application as a self-contained application. 2 | -------------------------------------------------------------------------------- /eng/readme-templates/Use.runtime.md: -------------------------------------------------------------------------------- 1 | ## Container sample: Run a simple application 2 | 3 | You can quickly run a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/), based on the [.NET console sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/README.md). 4 | 5 | Type the following command to run a sample console application: 6 | 7 | ```console 8 | docker run --rm mcr.microsoft.com/dotnet/samples 9 | ``` 10 | -------------------------------------------------------------------------------- /eng/readme-templates/Use.samples.md: -------------------------------------------------------------------------------- 1 | ## Container sample: Run a simple application 2 | 3 | You can quickly run a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/), based on the [.NET console sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/README.md). 4 | 5 | Type the following command to run a sample console application: 6 | 7 | ```console 8 | docker run --rm mcr.microsoft.com/dotnet/samples 9 | ``` 10 | 11 | ## Container sample: Run a web application 12 | 13 | You can quickly run a container with a pre-built [.NET Docker image](https://hub.docker.com/_/microsoft-dotnet-samples/), based on the [ASP.NET Core sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/aspnetapp/README.md). 14 | 15 | Type the following command to run a sample web application: 16 | 17 | ```console 18 | docker run -it --rm -p 8000:80 --name aspnetcore_sample mcr.microsoft.com/dotnet/samples:aspnetapp 19 | ``` 20 | 21 | After the application starts, navigate to `http://localhost:8000` in your web browser. 22 | 23 | See [Hosting ASP.NET Core Images with Docker over HTTPS](https://github.com/dotnet/dotnet-docker/blob/master/samples/host-aspnetcore-https.md) to use HTTPS with this image. 24 | -------------------------------------------------------------------------------- /eng/readme-templates/Use.sdk.md: -------------------------------------------------------------------------------- 1 | ## Building .NET Apps with Docker 2 | 3 | * [.NET Docker Sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/Dockerfile) builds, tests, and runs the sample. It includes and builds multiple projects. 4 | * [ASP.NET Core Docker Sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/aspnetapp/README.md) - This [sample](https://github.com/dotnet/dotnet-docker/blob/master/samples/aspnetapp/Dockerfile) demonstrates using Docker with an ASP.NET Core Web App. 5 | 6 | ## Develop .NET Apps in a Container 7 | 8 | The following samples show how to develop, build and test .NET applications with Docker without the need to install the .NET SDK. 9 | 10 | * [Build .NET Applications with SDK Container](https://github.com/dotnet/dotnet-docker/blob/master/samples/build-in-sdk-container.md) 11 | * [Test .NET Applications with SDK Container](https://github.com/dotnet/dotnet-docker/blob/master/samples/run-tests-in-sdk-container.md) 12 | * [Run .NET Applications with SDK Container](https://github.com/dotnet/dotnet-docker/blob/master/samples/run-in-sdk-container.md) 13 | 14 | -------------------------------------------------------------------------------- /eng/update-dependencies/ErrorTraceListener.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | 7 | namespace Dotnet.Docker 8 | { 9 | public class ErrorTraceListener : TraceListener 10 | { 11 | private readonly List _errors = new List(); 12 | 13 | public IEnumerable Errors => _errors; 14 | 15 | public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message) 16 | { 17 | if (eventType == TraceEventType.Error) 18 | { 19 | _errors.Add(message); 20 | } 21 | 22 | base.TraceEvent(eventCache, source, eventType, id, message); 23 | } 24 | 25 | public override void Write(string message) 26 | { 27 | } 28 | 29 | public override void WriteLine(string message) 30 | { 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /eng/update-dependencies/NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /eng/update-dependencies/VersionType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Dotnet.Docker 5 | { 6 | /// 7 | /// The different type of version numbers. 8 | /// 9 | public enum VersionType 10 | { 11 | Build, 12 | Product 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eng/update-dependencies/update-dependencies.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | latest 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /samples/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(DefaultItemExcludes);$(MSBuildProjectDirectory)/obj/**/* 5 | $(DefaultItemExcludes);$(MSBuildProjectDirectory)/bin/**/* 6 | 7 | 8 | 9 | $(MSBuildProjectDirectory)/obj/container/ 10 | $(MSBuildProjectDirectory)/bin/container/ 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/aspnetapp/.dockerignore: -------------------------------------------------------------------------------- 1 | # directories 2 | **/bin/ 3 | **/obj/ 4 | **/out/ 5 | 6 | # files 7 | Dockerfile* 8 | **/*.md 9 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | ENTRYPOINT ["dotnet", "aspnetapp.dll"] 20 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.alpine-arm64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-musl-arm64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-musl-arm64 --self-contained false --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-alpine-arm64v8 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | 20 | # See: https://github.com/dotnet/announcements/issues/20 21 | # Uncomment to enable globalization APIs (or delete) 22 | #ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false 23 | #RUN apk add --no-cache icu-libs 24 | #ENV LC_ALL=en_US.UTF-8 25 | #ENV LANG=en_US.UTF-8 26 | 27 | ENTRYPOINT ["./aspnetapp"] 28 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.alpine-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-musl-x64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-musl-x64 --self-contained false --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-alpine-amd64 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | 20 | # See: https://github.com/dotnet/announcements/issues/20 21 | # Uncomment to enable globalization APIs (or delete) 22 | #ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false 23 | #RUN apk add --no-cache icu-libs 24 | #ENV LC_ALL=en_US.UTF-8 25 | #ENV LANG=en_US.UTF-8 26 | 27 | ENTRYPOINT ["./aspnetapp"] 28 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.alpine-x64-slim: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-musl-x64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-musl-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine-amd64 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | 20 | # See: https://github.com/dotnet/announcements/issues/20 21 | # Uncomment to enable globalization APIs (or delete) 22 | #ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false 23 | #RUN apk add --no-cache icu-libs 24 | #ENV LC_ALL=en_US.UTF-8 25 | #ENV LANG=en_US.UTF-8 26 | 27 | ENTRYPOINT ["./aspnetapp"] 28 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.debian-arm32: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-arm 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-arm --self-contained false --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim-arm32v7 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | ENTRYPOINT ["./aspnetapp"] 20 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.debian-arm64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-arm64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-arm64 --self-contained false --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim-arm64v8 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | ENTRYPOINT ["./aspnetapp"] 20 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.debian-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-x64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-x64 --self-contained false --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim-amd64 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | ENTRYPOINT ["./aspnetapp"] 20 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.debian-x64-slim: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-x64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-buster-slim-amd64 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | ENTRYPOINT ["./aspnetapp"] 20 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.nanoserver-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r win-x64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained false --no-restore 14 | 15 | # final stage/image 16 | # Uses the 20H2 release; 2004, 1909, and 1809 are other choices 17 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-nanoserver-20H2 AS runtime 18 | WORKDIR /app 19 | COPY --from=build /app ./ 20 | ENTRYPOINT ["aspnetapp"] 21 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.nanoserver-x64-slim: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | # https://hub.docker.com/_/microsoft-dotnet 4 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 5 | WORKDIR /source 6 | 7 | # copy csproj and restore as distinct layers 8 | COPY *.sln . 9 | COPY aspnetapp/*.csproj ./aspnetapp/ 10 | RUN dotnet restore -r win-x64 11 | 12 | # copy everything else and build app 13 | COPY aspnetapp/. ./aspnetapp/ 14 | WORKDIR /source/aspnetapp 15 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 16 | 17 | # final stage/image 18 | # Uses the 20H2 release; 2004, 1909, and 1809 are other choices 19 | FROM mcr.microsoft.com/windows/nanoserver:20H2 AS runtime 20 | WORKDIR /app 21 | COPY --from=build /app ./ 22 | 23 | ENV ` 24 | # Configure web servers to bind to port 80 when present 25 | ASPNETCORE_URLS=http://+:80 ` 26 | # Enable detection of running in a container 27 | DOTNET_RUNNING_IN_CONTAINER=true 28 | 29 | ENTRYPOINT ["aspnetapp"] 30 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.ubuntu-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r linux-x64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r linux-x64 --self-contained false --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal-amd64 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | ENTRYPOINT ["./aspnetapp"] 20 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.windowsservercore-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0-windowsservercore-ltsc2019 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.sln . 7 | COPY aspnetapp/*.csproj ./aspnetapp/ 8 | RUN dotnet restore -r win-x64 9 | 10 | # copy everything else and build app 11 | COPY aspnetapp/. ./aspnetapp/ 12 | WORKDIR /source/aspnetapp 13 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained false --no-restore 14 | 15 | # final stage/image 16 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-windowsservercore-ltsc2019 AS runtime 17 | WORKDIR /app 18 | COPY --from=build /app ./ 19 | ENTRYPOINT ["aspnetapp"] 20 | -------------------------------------------------------------------------------- /samples/aspnetapp/Dockerfile.windowsservercore-x64-slim: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | # https://hub.docker.com/_/microsoft-dotnet 4 | FROM mcr.microsoft.com/dotnet/sdk:5.0-windowsservercore-ltsc2019 AS build 5 | WORKDIR /source 6 | 7 | # copy csproj and restore as distinct layers 8 | COPY *.sln . 9 | COPY aspnetapp/*.csproj ./aspnetapp/ 10 | RUN dotnet restore -r win-x64 11 | 12 | # copy everything else and build app 13 | COPY aspnetapp/. ./aspnetapp/ 14 | WORKDIR /source/aspnetapp 15 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 16 | 17 | # final stage/image 18 | # Uses the ltsc2019 release; 20H2, 2004, 1909, 1809, and ltsc2016 are other choices 19 | FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS runtime 20 | WORKDIR /app 21 | COPY --from=build /app ./ 22 | 23 | ENV ` 24 | # Configure web servers to bind to port 80 when present 25 | ASPNETCORE_URLS=http://+:80 ` 26 | # Enable detection of running in a container 27 | DOTNET_RUNNING_IN_CONTAINER=true 28 | 29 | ENTRYPOINT ["aspnetapp"] 30 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace aspnetapp.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace aspnetapp.Pages 10 | { 11 | public class IndexModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public IndexModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

9 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace aspnetapp.Pages 10 | { 11 | public class PrivacyModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public PrivacyModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using aspnetapp 2 | @namespace aspnetapp.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace aspnetapp 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:53930", 7 | "sslPort": 44370 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "aspnetapp": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | }, 26 | "publicdev": { 27 | "commandName": "Project", 28 | "launchBrowser": true, 29 | "applicationUrl": "http://+:80", 30 | "environmentVariables": { 31 | "ASPNETCORE_ENVIRONMENT": "Development" 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/aspnetapp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 57393389627611478466 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ualehosaini/dotnet-docker/50f62bf83b5f267330d15b03ddbcdce1ff30a4ea/samples/aspnetapp/aspnetapp/wwwroot/favicon.ico -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /samples/aspnetapp/aspnetapp/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /samples/complexapp/.dockerignore: -------------------------------------------------------------------------------- 1 | # directories 2 | **/bin/ 3 | **/obj/ 4 | **/out/ 5 | 6 | # files 7 | Dockerfile* 8 | **/*.md 9 | -------------------------------------------------------------------------------- /samples/complexapp/Dockerfile: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY complexapp/*.csproj complexapp/ 7 | COPY libfoo/*.csproj libfoo/ 8 | COPY libbar/*.csproj libbar/ 9 | RUN dotnet restore complexapp/complexapp.csproj 10 | 11 | # copy and build app and libraries 12 | COPY complexapp/ complexapp/ 13 | COPY libfoo/ libfoo/ 14 | COPY libbar/ libbar/ 15 | WORKDIR /source/complexapp 16 | RUN dotnet build -c release --no-restore 17 | 18 | # test stage -- exposes optional entrypoint 19 | # target entrypoint with: docker build --target test 20 | FROM build AS test 21 | WORKDIR /source/tests 22 | COPY tests/ . 23 | ENTRYPOINT ["dotnet", "test", "--logger:trx"] 24 | 25 | FROM build AS publish 26 | RUN dotnet publish -c release --no-build -o /app 27 | 28 | # final stage/image 29 | FROM mcr.microsoft.com/dotnet/runtime:5.0 30 | WORKDIR /app 31 | COPY --from=publish /app . 32 | ENTRYPOINT ["dotnet", "complexapp.dll"] 33 | -------------------------------------------------------------------------------- /samples/complexapp/complexapp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using libbar; 3 | using libfoo; 4 | using static System.Console; 5 | 6 | namespace complexapp 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | var initialString = StringLibrary.GetString(); 13 | var reversedString = StringUtils.ReverseString(initialString); 14 | 15 | WriteLine($"string: {initialString}"); 16 | WriteLine($"reversed: {reversedString}"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/complexapp/complexapp/complexapp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/complexapp/libbar/Bar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace libbar 4 | { 5 | public class StringUtils 6 | { 7 | public static string ReverseString(string input) 8 | { 9 | var chars = input.ToCharArray(); 10 | Array.Reverse(chars); 11 | var reversedString = new string(chars); 12 | return reversedString; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/complexapp/libbar/libbar.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/complexapp/libfoo/Foo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace libfoo 4 | { 5 | public class StringLibrary 6 | { 7 | public static string GetString() => "The quick brown fox jumps over the lazy dog"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/complexapp/libfoo/libfoo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/complexapp/tests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | using libbar; 4 | using libfoo; 5 | 6 | namespace tests 7 | { 8 | public class UnitTest1 9 | { 10 | [Fact] 11 | public void ReverseString() 12 | { 13 | var inputString = "The quick brown fox jumps over the lazy dog"; 14 | var expectedString = "god yzal eht revo spmuj xof nworb kciuq ehT"; 15 | var returnedString = StringUtils.ReverseString(inputString); 16 | Assert.True(expectedString == returnedString, "The input string was not reversed correctly."); 17 | } 18 | 19 | [Fact] 20 | public void InputString() 21 | { 22 | var inputString = "The quick brown fox jumps over the lazy dog"; 23 | var returnedString = StringLibrary.GetString(); 24 | Assert.True(inputString == returnedString, "The input string was not correct."); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /samples/complexapp/tests/tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/dotnetapp/.dockerignore: -------------------------------------------------------------------------------- 1 | # directories 2 | **/bin/ 3 | **/obj/ 4 | **/out/ 5 | 6 | # files 7 | Dockerfile* 8 | **/*.trx 9 | **/*.md 10 | **/*.ps1 11 | **/*.cmd 12 | **/*.sh 13 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["dotnet", "dotnetapp.dll"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.alpine-arm64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-musl-arm64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-musl-arm64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine-arm64v8 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | 18 | # See: https://github.com/dotnet/announcements/issues/20 19 | # Uncomment to enable globalization APIs (or delete) 20 | #ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false 21 | #RUN apk add --no-cache icu-libs 22 | #ENV LC_ALL=en_US.UTF-8 23 | #ENV LANG=en_US.UTF-8 24 | 25 | ENTRYPOINT ["./dotnetapp"] 26 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.alpine-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-musl-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-musl-x64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine-amd64 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | 18 | # See: https://github.com/dotnet/announcements/issues/20 19 | # Uncomment to enable globalization APIs (or delete) 20 | #ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false 21 | #RUN apk add --no-cache icu-libs 22 | #ENV LC_ALL=en_US.UTF-8 23 | #ENV LANG=en_US.UTF-8 24 | 25 | ENTRYPOINT ["./dotnetapp"] 26 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.alpine-x64-slim: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-musl-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-musl-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine-amd64 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | 18 | # See: https://github.com/dotnet/announcements/issues/20 19 | # Uncomment to enable globalization APIs (or delete) 20 | #ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false 21 | #RUN apk add --no-cache icu-libs 22 | #ENV LC_ALL=en_US.UTF-8 23 | #ENV LANG=en_US.UTF-8 24 | 25 | ENTRYPOINT ["./dotnetapp"] 26 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.debian-arm32: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-arm 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-arm --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-buster-slim-arm32v7 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.debian-arm64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-arm64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-arm64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-buster-slim-arm64v8 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.debian-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-x64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-buster-slim-amd64 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.debian-x64-slim: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-buster-slim-amd64 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.nanoserver-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r win-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | # Uses the 20H2 release; Other choices: 2004, 1909, 1809 15 | FROM mcr.microsoft.com/dotnet/runtime:5.0-nanoserver-20H2 16 | WORKDIR /app 17 | COPY --from=build /app . 18 | ENTRYPOINT ["dotnetapp"] 19 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.nanoserver-x64-slim: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r win-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 12 | 13 | # final stage/image 14 | # Uses the 20H2 release; Other choices: 2004, 1909, 1809 15 | FROM mcr.microsoft.com/windows/nanoserver:20H2 16 | WORKDIR /app 17 | COPY --from=build /app . 18 | 19 | # Enable detection of running in a container 20 | ENV DOTNET_RUNNING_IN_CONTAINER=true 21 | 22 | ENTRYPOINT ["dotnetapp"] 23 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.ubuntu-arm32: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-arm 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-arm --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-focal-arm32v7 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.ubuntu-arm64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-arm64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-arm64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-focal-arm64v8 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.ubuntu-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-x64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-focal-amd64 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.ubuntu-x64-slim: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r linux-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r linux-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-focal-amd64 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["./dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.windowsservercore-x64: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0-windowsservercore-ltsc2019 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r win-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained false --no-restore 12 | 13 | # final stage/image 14 | FROM mcr.microsoft.com/dotnet/runtime:5.0-windowsservercore-ltsc2019 15 | WORKDIR /app 16 | COPY --from=build /app . 17 | ENTRYPOINT ["dotnetapp"] 18 | -------------------------------------------------------------------------------- /samples/dotnetapp/Dockerfile.windowsservercore-x64-slim: -------------------------------------------------------------------------------- 1 | # https://hub.docker.com/_/microsoft-dotnet 2 | FROM mcr.microsoft.com/dotnet/sdk:5.0-windowsservercore-ltsc2019 AS build 3 | WORKDIR /source 4 | 5 | # copy csproj and restore as distinct layers 6 | COPY *.csproj . 7 | RUN dotnet restore -r win-x64 8 | 9 | # copy and publish app and libraries 10 | COPY . . 11 | RUN dotnet publish -c release -o /app -r win-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true 12 | 13 | # final stage/image 14 | # Uses the ltsc2019 release; 20H2, 2004, 1909, 1809, and ltsc2016 are other choices 15 | FROM mcr.microsoft.com/windows/servercore:ltsc2019 16 | WORKDIR /app 17 | COPY --from=build /app . 18 | 19 | # Enable detection of running in a container 20 | ENV DOTNET_RUNNING_IN_CONTAINER=true 21 | 22 | ENTRYPOINT ["dotnetapp"] 23 | -------------------------------------------------------------------------------- /samples/dotnetapp/dotnetapp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/snippets/README.md: -------------------------------------------------------------------------------- 1 | # Content has Moved 2 | 3 | This file has moved to a new [location](../../documentation/scenarios/README.md). 4 | -------------------------------------------------------------------------------- /samples/snippets/installing-dotnet.md: -------------------------------------------------------------------------------- 1 | # Content has Moved 2 | 3 | This file has moved to a new [location](../../documentation/scenarios/installing-dotnet.md). 4 | -------------------------------------------------------------------------------- /samples/snippets/nuget-credentials.md: -------------------------------------------------------------------------------- 1 | # Content has Moved 2 | 3 | This file has moved to a new [location](../../documentation/scenarios/nuget-credentials.md). 4 | -------------------------------------------------------------------------------- /samples/snippets/using-system-drawing-common.md: -------------------------------------------------------------------------------- 1 | # Content has Moved 2 | 3 | This file has moved to a new [location](../../documentation/scenarios/using-system-drawing-common.md). 4 | -------------------------------------------------------------------------------- /src/aspnet/2.1/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-alpine3.12 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNETCORE_VERSION=2.1.25 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-musl-x64.tar.gz \ 8 | && aspnetcore_sha512='58a3e30a27ce53e6c8b5416d0b9eb00553d94c64be93c2b1cfcc57bc40f642017716954a213a7693ee8f7ff6f877c5e7a2148761a10f1b5044f572bd02f6cc06' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 12 | && rm aspnetcore.tar.gz \ 13 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 14 | -------------------------------------------------------------------------------- /src/aspnet/2.1/bionic/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-bionic 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install ASP.NET Core 10 | ENV ASPNETCORE_VERSION=2.1.25 11 | 12 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-x64.tar.gz \ 13 | && aspnetcore_sha512='fc46e2c23048ad859b01ecd3600f312e6c0eae2a9c88302535a55d0a3d4d22065c53e4bf002fa5f959d488d5aba7dfeb60b15b300a40fae6b118f75ee3ab5918' \ 14 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 17 | && rm aspnetcore.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/aspnet/2.1/bionic/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-bionic-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install ASP.NET Core 10 | ENV ASPNETCORE_VERSION=2.1.25 11 | 12 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-arm.tar.gz \ 13 | && aspnetcore_sha512='f8f0eb9ed7748e0676f38817943c74fac3d6a94094a3e2942ac11ed0ee04ac61991c16727704e31a854f655d8c73a02c09a960182f9d4996e6fc90a7d5fab29e' \ 14 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 17 | && rm aspnetcore.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/aspnet/2.1/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-focal 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install ASP.NET Core 10 | ENV ASPNETCORE_VERSION=2.1.25 11 | 12 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-x64.tar.gz \ 13 | && aspnetcore_sha512='fc46e2c23048ad859b01ecd3600f312e6c0eae2a9c88302535a55d0a3d4d22065c53e4bf002fa5f959d488d5aba7dfeb60b15b300a40fae6b118f75ee3ab5918' \ 14 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 17 | && rm aspnetcore.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/aspnet/2.1/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-focal-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install ASP.NET Core 10 | ENV ASPNETCORE_VERSION=2.1.25 11 | 12 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-arm.tar.gz \ 13 | && aspnetcore_sha512='f8f0eb9ed7748e0676f38817943c74fac3d6a94094a3e2942ac11ed0ee04ac61991c16727704e31a854f655d8c73a02c09a960182f9d4996e6fc90a7d5fab29e' \ 14 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 17 | && rm aspnetcore.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/aspnet/2.1/stretch-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-stretch-slim 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install ASP.NET Core 10 | ENV ASPNETCORE_VERSION=2.1.25 11 | 12 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-x64.tar.gz \ 13 | && aspnetcore_sha512='fc46e2c23048ad859b01ecd3600f312e6c0eae2a9c88302535a55d0a3d4d22065c53e4bf002fa5f959d488d5aba7dfeb60b15b300a40fae6b118f75ee3ab5918' \ 14 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 17 | && rm aspnetcore.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/aspnet/2.1/stretch-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-stretch-slim-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install ASP.NET Core 10 | ENV ASPNETCORE_VERSION=2.1.25 11 | 12 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-arm.tar.gz \ 13 | && aspnetcore_sha512='f8f0eb9ed7748e0676f38817943c74fac3d6a94094a3e2942ac11ed0ee04ac61991c16727704e31a854f655d8c73a02c09a960182f9d4996e6fc90a7d5fab29e' \ 14 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ 17 | && rm aspnetcore.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/aspnet/3.1/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-alpine3.12 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-musl-x64.tar.gz \ 7 | && aspnetcore_sha512='0e4ef3c8884c3ebf5db99733e89edaf8c1272bae8ad2f88dab708e8566020d161960cd4f6f4d0df7231da36ab6248670a50c3dd415d740ac8d26e86dd69e2438' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/alpine3.12/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-alpine3.12-arm64v8 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-musl-arm64.tar.gz \ 7 | && aspnetcore_sha512='9f8c9fd651ab0784d9449b0f314575f7c3cf3473235fb9d1ea505b970e498c0ff5bd94c347c59e5d2859454e95ea266182e3ba1402fd323909f4f0c382fa0260' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/bionic/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-bionic 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-x64.tar.gz \ 7 | && aspnetcore_sha512='e6d384a4c05bc6a693a85dc1da5f34e26449ad5d9414dee5f46a56805ac53eb304610be06d6a2a683f2d9e1447f316f47abea71fbfd6ee901dcc9da9d7c4e03b' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/bionic/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-bionic-arm32v7 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-arm.tar.gz \ 7 | && aspnetcore_sha512='656f95054ca2a40f12f993a7b2d0f734ab7952f52ced8bb52c4c2074a68b93f82fcbc191a215587306f0a7b82e7aec0bd1473de8bf2e8842fabab4d0a8809ead' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/bionic/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-bionic-arm64v8 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-arm64.tar.gz \ 7 | && aspnetcore_sha512='ad0f2bec8852037da08d8399ce200f5dde852453f0098b6c9b6451c1050fb7ff49a2fcedcf91f027af758782dfd5016b411d7c74bf8f3f1a19a93a129e48cb1a' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/buster-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-buster-slim 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-x64.tar.gz \ 7 | && aspnetcore_sha512='e6d384a4c05bc6a693a85dc1da5f34e26449ad5d9414dee5f46a56805ac53eb304610be06d6a2a683f2d9e1447f316f47abea71fbfd6ee901dcc9da9d7c4e03b' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/buster-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-buster-slim-arm32v7 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-arm.tar.gz \ 7 | && aspnetcore_sha512='656f95054ca2a40f12f993a7b2d0f734ab7952f52ced8bb52c4c2074a68b93f82fcbc191a215587306f0a7b82e7aec0bd1473de8bf2e8842fabab4d0a8809ead' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/buster-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-buster-slim-arm64v8 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-arm64.tar.gz \ 7 | && aspnetcore_sha512='ad0f2bec8852037da08d8399ce200f5dde852453f0098b6c9b6451c1050fb7ff49a2fcedcf91f027af758782dfd5016b411d7c74bf8f3f1a19a93a129e48cb1a' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-focal 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-x64.tar.gz \ 7 | && aspnetcore_sha512='e6d384a4c05bc6a693a85dc1da5f34e26449ad5d9414dee5f46a56805ac53eb304610be06d6a2a683f2d9e1447f316f47abea71fbfd6ee901dcc9da9d7c4e03b' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-focal-arm32v7 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-arm.tar.gz \ 7 | && aspnetcore_sha512='656f95054ca2a40f12f993a7b2d0f734ab7952f52ced8bb52c4c2074a68b93f82fcbc191a215587306f0a7b82e7aec0bd1473de8bf2e8842fabab4d0a8809ead' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/3.1/focal/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:3.1-focal-arm64v8 3 | 4 | # Install ASP.NET Core 5 | RUN aspnetcore_version=3.1.12 \ 6 | && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-arm64.tar.gz \ 7 | && aspnetcore_sha512='ad0f2bec8852037da08d8399ce200f5dde852453f0098b6c9b6451c1050fb7ff49a2fcedcf91f027af758782dfd5016b411d7c74bf8f3f1a19a93a129e48cb1a' \ 8 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 9 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 10 | && rm aspnetcore.tar.gz 11 | -------------------------------------------------------------------------------- /src/aspnet/5.0/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:5.0-alpine3.12-amd64 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=5.0.3 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ 8 | && aspnetcore_sha512='cd4471a542b4883987c067ecf180bd1ccc414f54fc90dd134c59bdba58f8e102366494b4fffb242de57c248d3915f34953de5330a9664b318ae58c1e1c004905' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/5.0/alpine3.12/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:5.0-alpine3.12-arm64v8 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=5.0.3 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-arm64.tar.gz \ 8 | && aspnetcore_sha512='adfd3548e9b8bc826a5746edc9501a504912a08e5b397a71b940847ff1f86edf85b747ce261a80dffa95b7cd7265f3d7552921e7216f224f4cb409b45e207d64' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/5.0/alpine3.13/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:5.0-alpine3.13-amd64 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=5.0.3 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ 8 | && aspnetcore_sha512='cd4471a542b4883987c067ecf180bd1ccc414f54fc90dd134c59bdba58f8e102366494b4fffb242de57c248d3915f34953de5330a9664b318ae58c1e1c004905' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/5.0/alpine3.13/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:5.0-alpine3.13-arm32v7 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=5.0.2 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-arm.tar.gz \ 8 | && aspnetcore_sha512='40765bcbe7e0cfa8d7096561daae6ed7d803629b1570d3a0b3d78183f9b7c7cc19f8822067e1e36e94b05681b9e7793f635de3fdc1c333db2b5135f6da54a912' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/5.0/alpine3.13/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:5.0-alpine3.13-arm64v8 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=5.0.3 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-arm64.tar.gz \ 8 | && aspnetcore_sha512='adfd3548e9b8bc826a5746edc9501a504912a08e5b397a71b940847ff1f86edf85b747ce261a80dffa95b7cd7265f3d7552921e7216f224f4cb409b45e207d64' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/5.0/buster-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:buster-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \ 10 | && aspnetcore_sha512='188618b07cd5c97a34c77efccc7c4eba10a52681592ef711a005c82d243e601891418e0dcc27a22aae7dd6ae33d35e0bb7aa9b9fc022746c6c2414bd25cdb110' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:5.0-buster-slim-amd64 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/5.0/buster-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:buster-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm.tar.gz \ 10 | && aspnetcore_sha512='2e9ea5fdb15b8fe56890cfb635216b3c68afb12a48d40e2c1e58838baffb1a80aa75e6da363d878c3caaf9880c506ec12e316b93baae1e307ef04eb90d7d327c' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:5.0-buster-slim-arm32v7 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/5.0/buster-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:buster-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \ 10 | && aspnetcore_sha512='4eaf1b0120479102b342f1f3a8ad8f40b7326e3657d2b7359c09fd1951c5169ca02d1ead4d4d01f6e594adbe0cb21f135f4c61ff90613219596f6cc222161717' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:5.0-buster-slim-arm64v8 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/5.0/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:focal-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \ 10 | && aspnetcore_sha512='188618b07cd5c97a34c77efccc7c4eba10a52681592ef711a005c82d243e601891418e0dcc27a22aae7dd6ae33d35e0bb7aa9b9fc022746c6c2414bd25cdb110' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:5.0-focal-amd64 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/5.0/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:focal-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm.tar.gz \ 10 | && aspnetcore_sha512='2e9ea5fdb15b8fe56890cfb635216b3c68afb12a48d40e2c1e58838baffb1a80aa75e6da363d878c3caaf9880c506ec12e316b93baae1e307ef04eb90d7d327c' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:5.0-focal-arm32v7 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/5.0/focal/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:focal-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \ 10 | && aspnetcore_sha512='4eaf1b0120479102b342f1f3a8ad8f40b7326e3657d2b7359c09fd1951c5169ca02d1ead4d4d01f6e594adbe0cb21f135f4c61ff90613219596f6cc222161717' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:5.0-focal-arm64v8 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/5.0/windowsservercore-ltsc2019/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | ARG REPO=mcr.microsoft.com/dotnet/runtime 4 | FROM $REPO:5.0-windowsservercore-ltsc2019 5 | 6 | ENV ASPNET_VERSION=5.0.3 7 | 8 | RUN powershell -Command ` 9 | $ErrorActionPreference = 'Stop'; ` 10 | $ProgressPreference = 'SilentlyContinue'; ` 11 | ` 12 | # Install ASP.NET Core Runtime 13 | Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$Env:ASPNET_VERSION/aspnetcore-runtime-$Env:ASPNET_VERSION-win-x64.zip; ` 14 | $aspnetcore_sha512 = '1188f9af667338bd1785246d1682876c10eabd584f1f8dc52a7cae06d2ad03c0b4236c4a603bd436d5fcf8f4221026b6a64cb4aa5ee13bf1f8e32e3b774e25d0'; ` 15 | if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` 16 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 17 | exit 1; ` 18 | }; ` 19 | ` 20 | tar -C $Env:ProgramFiles\dotnet -oxzf aspnetcore.zip ./shared/Microsoft.AspNetCore.App; ` 21 | Remove-Item -Force aspnetcore.zip 22 | -------------------------------------------------------------------------------- /src/aspnet/6.0/alpine3.13/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:6.0-alpine3.13-amd64 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=6.0.0-preview.1.21103.6 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ 8 | && aspnetcore_sha512='b0bc62fbd4c0509e634828089637eb2c0fc326ebfc58913d09ccf7b47b09ad9133e77d2602ee478ac0c1fcad3c89affc48e374675f10457c4b4f6ccef2e2aec8' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:6.0-alpine3.13-arm32v7 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=6.0.0-preview.1.21103.6 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-arm.tar.gz \ 8 | && aspnetcore_sha512='f7a8bf0cdc06044d3e5a523dcc65132883ed7fc94cc71862838d4c7cb78c49484ec254324f92576292946a33b151590a9a24b50ae162abbd7980ee71a324741b' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | FROM $REPO:6.0-alpine3.13-arm64v8 3 | 4 | # Install ASP.NET Core 5 | ENV ASPNET_VERSION=6.0.0-preview.1.21103.6 6 | 7 | RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-arm64.tar.gz \ 8 | && aspnetcore_sha512='75ffdc561476085ccb60472e9d74edd850973b762d0bce490bf3a011c8fc526c90cc04106a89d456735f43335387698c05e472113fa8f40c7741287b77b0f46a' \ 9 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 10 | && tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 11 | && rm aspnetcore.tar.gz 12 | -------------------------------------------------------------------------------- /src/aspnet/6.0/bullseye-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=6.0.0-preview.1.21103.6 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:bullseye-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \ 10 | && aspnetcore_sha512='77b4b2c20c96cd8b4ec152c133f8c0501ab6f38bc3a949461bd0af1246bc2084d687f0c639dbbdf858948c496eaf86749e1ae45eb30ab8d31adca9abac5a7346' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:6.0-bullseye-slim-amd64 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=6.0.0-preview.1.21103.6 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:bullseye-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm.tar.gz \ 10 | && aspnetcore_sha512='05cd6808b256c24e16c91513da712e4dd9cb3189dbd6928cd5959c4805fd5f6fb4b5e6a4cf7156e0af81ca151eac22df185af09567de2cbda4bfc4b4ec3f86b6' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:6.0-bullseye-slim-arm32v7 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=6.0.0-preview.1.21103.6 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:bullseye-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \ 10 | && aspnetcore_sha512='152b93a2b9ef2a481280ce3549b5fea1fe88b86c9c41f2c09499681ec6f485c978a68d484e25e00776bfc2cbc285e968dd4f0b0a9ddb83f57faea2dd3a71faa0' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:6.0-bullseye-slim-arm64v8 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/6.0/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=6.0.0-preview.1.21103.6 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:focal-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \ 10 | && aspnetcore_sha512='77b4b2c20c96cd8b4ec152c133f8c0501ab6f38bc3a949461bd0af1246bc2084d687f0c639dbbdf858948c496eaf86749e1ae45eb30ab8d31adca9abac5a7346' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:6.0-focal-amd64 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/6.0/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=6.0.0-preview.1.21103.6 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:focal-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm.tar.gz \ 10 | && aspnetcore_sha512='05cd6808b256c24e16c91513da712e4dd9cb3189dbd6928cd5959c4805fd5f6fb4b5e6a4cf7156e0af81ca151eac22df185af09567de2cbda4bfc4b4ec3f86b6' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:6.0-focal-arm32v7 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/6.0/focal/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime 2 | ARG ASPNET_VERSION=6.0.0-preview.1.21103.6 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:focal-curl as installer 6 | ARG ASPNET_VERSION 7 | 8 | # Retrieve ASP.NET Core 9 | RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \ 10 | && aspnetcore_sha512='152b93a2b9ef2a481280ce3549b5fea1fe88b86c9c41f2c09499681ec6f485c978a68d484e25e00776bfc2cbc285e968dd4f0b0a9ddb83f57faea2dd3a71faa0' \ 11 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 12 | && tar -ozxf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \ 13 | && rm aspnetcore.tar.gz 14 | 15 | 16 | # ASP.NET Core image 17 | FROM $REPO:6.0-focal-arm64v8 18 | ARG ASPNET_VERSION 19 | 20 | ENV ASPNET_VERSION=$ASPNET_VERSION 21 | 22 | COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] 23 | -------------------------------------------------------------------------------- /src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | ARG REPO=mcr.microsoft.com/dotnet/runtime 4 | FROM $REPO:6.0-windowsservercore-ltsc2019 5 | 6 | ENV ASPNET_VERSION=6.0.0-preview.1.21103.6 7 | 8 | RUN powershell -Command ` 9 | $ErrorActionPreference = 'Stop'; ` 10 | $ProgressPreference = 'SilentlyContinue'; ` 11 | ` 12 | # Install ASP.NET Core Runtime 13 | Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$Env:ASPNET_VERSION/aspnetcore-runtime-$Env:ASPNET_VERSION-win-x64.zip; ` 14 | $aspnetcore_sha512 = '83ed41346c787d7893acf4e15a0d74dac8e26282ce5498439ef0f1a366e8e4915f8c02e61d70da2d972da59216fdf2cc09c91b5f1f384f9a5b4e61a78b9b0a78'; ` 15 | if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` 16 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 17 | exit 1; ` 18 | }; ` 19 | ` 20 | tar -C $Env:ProgramFiles\dotnet -oxzf aspnetcore.zip ./shared/Microsoft.AspNetCore.App; ` 21 | Remove-Item -Force aspnetcore.zip 22 | -------------------------------------------------------------------------------- /src/runtime-deps/2.1/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/alpine:3.12 2 | 3 | RUN apk add --no-cache \ 4 | ca-certificates \ 5 | \ 6 | # .NET Core dependencies 7 | krb5-libs \ 8 | libgcc \ 9 | libintl \ 10 | libssl1.1 \ 11 | libstdc++ \ 12 | lttng-ust \ 13 | tzdata \ 14 | userspace-rcu \ 15 | zlib 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true \ 22 | # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) 23 | DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true 24 | -------------------------------------------------------------------------------- /src/runtime-deps/2.1/bionic/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/ubuntu:bionic 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu60 \ 12 | liblttng-ust0 \ 13 | libssl1.0.0 \ 14 | libstdc++6 \ 15 | zlib1g \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV \ 19 | # Configure web servers to bind to port 80 when present 20 | ASPNETCORE_URLS=http://+:80 \ 21 | # Enable detection of running in a container 22 | DOTNET_RUNNING_IN_CONTAINER=true 23 | -------------------------------------------------------------------------------- /src/runtime-deps/2.1/bionic/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/ubuntu:bionic 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu60 \ 12 | liblttng-ust0 \ 13 | libssl1.0.0 \ 14 | libstdc++6 \ 15 | zlib1g \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV \ 19 | # Configure web servers to bind to port 80 when present 20 | ASPNETCORE_URLS=http://+:80 \ 21 | # Enable detection of running in a container 22 | DOTNET_RUNNING_IN_CONTAINER=true 23 | -------------------------------------------------------------------------------- /src/runtime-deps/2.1/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/ubuntu:focal 2 | 3 | RUN apt-get update \ 4 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu66 \ 12 | liblttng-ust0 \ 13 | libssl1.1 \ 14 | libstdc++6 \ 15 | zlib1g \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV \ 19 | # Configure web servers to bind to port 80 when present 20 | ASPNETCORE_URLS=http://+:80 \ 21 | # Enable detection of running in a container 22 | DOTNET_RUNNING_IN_CONTAINER=true 23 | -------------------------------------------------------------------------------- /src/runtime-deps/2.1/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/ubuntu:focal 2 | 3 | RUN apt-get update \ 4 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu66 \ 12 | liblttng-ust0 \ 13 | libssl1.1 \ 14 | libstdc++6 \ 15 | zlib1g \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV \ 19 | # Configure web servers to bind to port 80 when present 20 | ASPNETCORE_URLS=http://+:80 \ 21 | # Enable detection of running in a container 22 | DOTNET_RUNNING_IN_CONTAINER=true 23 | -------------------------------------------------------------------------------- /src/runtime-deps/2.1/stretch-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/debian:stretch-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu57 \ 12 | liblttng-ust0 \ 13 | libssl1.0.2 \ 14 | libstdc++6 \ 15 | zlib1g \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV \ 19 | # Configure web servers to bind to port 80 when present 20 | ASPNETCORE_URLS=http://+:80 \ 21 | # Enable detection of running in a container 22 | DOTNET_RUNNING_IN_CONTAINER=true 23 | -------------------------------------------------------------------------------- /src/runtime-deps/2.1/stretch-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/debian:stretch-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu57 \ 12 | liblttng-ust0 \ 13 | libssl1.0.2 \ 14 | libstdc++6 \ 15 | zlib1g \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV \ 19 | # Configure web servers to bind to port 80 when present 20 | ASPNETCORE_URLS=http://+:80 \ 21 | # Enable detection of running in a container 22 | DOTNET_RUNNING_IN_CONTAINER=true 23 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/alpine:3.12 2 | 3 | RUN apk add --no-cache \ 4 | ca-certificates \ 5 | \ 6 | # .NET Core dependencies 7 | krb5-libs \ 8 | libgcc \ 9 | libintl \ 10 | libssl1.1 \ 11 | libstdc++ \ 12 | zlib 13 | 14 | ENV \ 15 | # Configure web servers to bind to port 80 when present 16 | ASPNETCORE_URLS=http://+:80 \ 17 | # Enable detection of running in a container 18 | DOTNET_RUNNING_IN_CONTAINER=true \ 19 | # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) 20 | DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true 21 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/alpine3.12/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/alpine:3.12 2 | 3 | RUN apk add --no-cache \ 4 | ca-certificates \ 5 | \ 6 | # .NET Core dependencies 7 | krb5-libs \ 8 | libgcc \ 9 | libintl \ 10 | libssl1.1 \ 11 | libstdc++ \ 12 | zlib 13 | 14 | ENV \ 15 | # Configure web servers to bind to port 80 when present 16 | ASPNETCORE_URLS=http://+:80 \ 17 | # Enable detection of running in a container 18 | DOTNET_RUNNING_IN_CONTAINER=true \ 19 | # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) 20 | DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true 21 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/bionic/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/ubuntu:bionic 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu60 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/bionic/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/ubuntu:bionic 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu60 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/bionic/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/ubuntu:bionic 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu60 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/buster-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/debian:buster-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu63 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/buster-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/debian:buster-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu63 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/buster-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/debian:buster-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu63 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/ubuntu:focal 2 | 3 | RUN apt-get update \ 4 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu66 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/ubuntu:focal 2 | 3 | RUN apt-get update \ 4 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu66 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/3.1/focal/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/ubuntu:focal 2 | 3 | RUN apt-get update \ 4 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu66 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/5.0/alpine3.13/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/alpine:3.13 2 | 3 | RUN apk add --no-cache \ 4 | ca-certificates \ 5 | \ 6 | # .NET Core dependencies 7 | krb5-libs \ 8 | libgcc \ 9 | libintl \ 10 | libssl1.1 \ 11 | libstdc++ \ 12 | zlib 13 | 14 | ENV \ 15 | # Configure web servers to bind to port 80 when present 16 | ASPNETCORE_URLS=http://+:80 \ 17 | # Enable detection of running in a container 18 | DOTNET_RUNNING_IN_CONTAINER=true \ 19 | # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) 20 | DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true 21 | -------------------------------------------------------------------------------- /src/runtime-deps/5.0/alpine3.13/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/alpine:3.13 2 | 3 | RUN apk add --no-cache \ 4 | ca-certificates \ 5 | \ 6 | # .NET Core dependencies 7 | krb5-libs \ 8 | libgcc \ 9 | libintl \ 10 | libssl1.1 \ 11 | libstdc++ \ 12 | zlib 13 | 14 | ENV \ 15 | # Configure web servers to bind to port 80 when present 16 | ASPNETCORE_URLS=http://+:80 \ 17 | # Enable detection of running in a container 18 | DOTNET_RUNNING_IN_CONTAINER=true \ 19 | # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) 20 | DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true 21 | -------------------------------------------------------------------------------- /src/runtime-deps/6.0/bullseye-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amd64/debian:bullseye-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu67 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/6.0/bullseye-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/debian:bullseye-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu67 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime-deps/6.0/bullseye-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/debian:bullseye-slim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | \ 7 | # .NET Core dependencies 8 | libc6 \ 9 | libgcc1 \ 10 | libgssapi-krb5-2 \ 11 | libicu67 \ 12 | libssl1.1 \ 13 | libstdc++6 \ 14 | zlib1g \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | ENV \ 18 | # Configure web servers to bind to port 80 when present 19 | ASPNETCORE_URLS=http://+:80 \ 20 | # Enable detection of running in a container 21 | DOTNET_RUNNING_IN_CONTAINER=true 22 | -------------------------------------------------------------------------------- /src/runtime/2.1/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-alpine3.12 3 | 4 | # Install .NET Core 5 | ENV DOTNET_VERSION=2.1.25 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ 8 | && dotnet_sha512='bb23d691826f467ba8075ca804668dfa21076935727ba4669c39bfbbeea8d5b941a66616989469e5f44eb5f87dcb577409489ad061c62c1e6b1c1355a87d4820' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/2.1/bionic/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-bionic 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | ENV DOTNET_VERSION=2.1.25 11 | 12 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \ 13 | && dotnet_sha512='ab93b5e4117b4f7d3267eef5552d5001e5f0974e2cc3994b80cfdc2dfe56d24f62bd49754b8dcdf0061f7e572e424631ca96d60efc63d6b63fdb2109fbf147f8' \ 14 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ 17 | && rm dotnet.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/runtime/2.1/bionic/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-bionic-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | ENV DOTNET_VERSION=2.1.25 11 | 12 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm.tar.gz \ 13 | && dotnet_sha512='84876749e588e2b8c8d1cf2205007183dc6deb13599a080479d848d0634c9338fed99c8a8818a2595f93c0d35aee4d0ea1835ab9ac848ca1c910b4ba72c547f7' \ 14 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ 17 | && rm dotnet.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/runtime/2.1/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-focal 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | ENV DOTNET_VERSION=2.1.25 11 | 12 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \ 13 | && dotnet_sha512='ab93b5e4117b4f7d3267eef5552d5001e5f0974e2cc3994b80cfdc2dfe56d24f62bd49754b8dcdf0061f7e572e424631ca96d60efc63d6b63fdb2109fbf147f8' \ 14 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ 17 | && rm dotnet.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/runtime/2.1/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-focal-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | ENV DOTNET_VERSION=2.1.25 11 | 12 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm.tar.gz \ 13 | && dotnet_sha512='84876749e588e2b8c8d1cf2205007183dc6deb13599a080479d848d0634c9338fed99c8a8818a2595f93c0d35aee4d0ea1835ab9ac848ca1c910b4ba72c547f7' \ 14 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ 17 | && rm dotnet.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/runtime/2.1/stretch-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-stretch-slim 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | ENV DOTNET_VERSION=2.1.25 11 | 12 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \ 13 | && dotnet_sha512='ab93b5e4117b4f7d3267eef5552d5001e5f0974e2cc3994b80cfdc2dfe56d24f62bd49754b8dcdf0061f7e572e424631ca96d60efc63d6b63fdb2109fbf147f8' \ 14 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ 17 | && rm dotnet.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/runtime/2.1/stretch-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:2.1-stretch-slim-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | ENV DOTNET_VERSION=2.1.25 11 | 12 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm.tar.gz \ 13 | && dotnet_sha512='84876749e588e2b8c8d1cf2205007183dc6deb13599a080479d848d0634c9338fed99c8a8818a2595f93c0d35aee4d0ea1835ab9ac848ca1c910b4ba72c547f7' \ 14 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 15 | && mkdir -p /usr/share/dotnet \ 16 | && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ 17 | && rm dotnet.tar.gz \ 18 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 19 | -------------------------------------------------------------------------------- /src/runtime/3.1/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-alpine3.12 3 | 4 | # Install .NET Core 5 | RUN dotnet_version=3.1.12 \ 6 | && wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-musl-x64.tar.gz \ 7 | && dotnet_sha512='f38aced794bba9a896df969667b2b01528f7857b2dd9b9018c4c2c8e1e646c6ed44e66b9b28f76bded1472fb0dd932a575c6887c5a0da9848bb3d2694751a413' \ 8 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 9 | && mkdir -p /usr/share/dotnet \ 10 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 11 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 12 | && rm dotnet.tar.gz 13 | -------------------------------------------------------------------------------- /src/runtime/3.1/alpine3.12/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-alpine3.12-arm64v8 3 | 4 | # Install .NET Core 5 | RUN dotnet_version=3.1.12 \ 6 | && wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-musl-arm64.tar.gz \ 7 | && dotnet_sha512='d0b5bd6aa0e40bfdd980887f6fca9f596852617107ec9b1b00bb5aa5b79718ab10e6befd778e97426558aa1c5652d8b6192a2a57f7da9d25471cbcac5b8fd5fb' \ 8 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 9 | && mkdir -p /usr/share/dotnet \ 10 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 11 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 12 | && rm dotnet.tar.gz 13 | -------------------------------------------------------------------------------- /src/runtime/3.1/bionic/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-bionic 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-x64.tar.gz \ 12 | && dotnet_sha512='d1a815d26c75d9fe41479efc32626c1c83bdc616cdcde63768ff7480d721c37427a17fd3999366c738aa936afe43c5426162c4b188f923d810762c91230e2d8b' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/bionic/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-bionic-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-arm.tar.gz \ 12 | && dotnet_sha512='5d241663ef78720dacd4073f06150e0b1e085cda542436a9319beb3c14fb6dc19ade72caa738ce50d2bdd31e2936858d9f080a2f9ae43856587b165407b47314' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/bionic/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-bionic-arm64v8 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-arm64.tar.gz \ 12 | && dotnet_sha512='1c7ca36af74524fa5ec49374983338ab3f1584a03aec11080943cf3bbc7e1fb36abf313549231e5be1c58c2252f27d4e001cac1464ee20702daf831ec61c92cf' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/buster-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-buster-slim 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-x64.tar.gz \ 12 | && dotnet_sha512='d1a815d26c75d9fe41479efc32626c1c83bdc616cdcde63768ff7480d721c37427a17fd3999366c738aa936afe43c5426162c4b188f923d810762c91230e2d8b' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/buster-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-buster-slim-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-arm.tar.gz \ 12 | && dotnet_sha512='5d241663ef78720dacd4073f06150e0b1e085cda542436a9319beb3c14fb6dc19ade72caa738ce50d2bdd31e2936858d9f080a2f9ae43856587b165407b47314' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/buster-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-buster-slim-arm64v8 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-arm64.tar.gz \ 12 | && dotnet_sha512='1c7ca36af74524fa5ec49374983338ab3f1584a03aec11080943cf3bbc7e1fb36abf313549231e5be1c58c2252f27d4e001cac1464ee20702daf831ec61c92cf' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-focal 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-x64.tar.gz \ 12 | && dotnet_sha512='d1a815d26c75d9fe41479efc32626c1c83bdc616cdcde63768ff7480d721c37427a17fd3999366c738aa936afe43c5426162c4b188f923d810762c91230e2d8b' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-focal-arm32v7 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-arm.tar.gz \ 12 | && dotnet_sha512='5d241663ef78720dacd4073f06150e0b1e085cda542436a9319beb3c14fb6dc19ade72caa738ce50d2bdd31e2936858d9f080a2f9ae43856587b165407b47314' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/3.1/focal/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:3.1-focal-arm64v8 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Install .NET Core 10 | RUN dotnet_version=3.1.12 \ 11 | && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-arm64.tar.gz \ 12 | && dotnet_sha512='1c7ca36af74524fa5ec49374983338ab3f1584a03aec11080943cf3bbc7e1fb36abf313549231e5be1c58c2252f27d4e001cac1464ee20702daf831ec61c92cf' \ 13 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 14 | && mkdir -p /usr/share/dotnet \ 15 | && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \ 16 | && rm dotnet.tar.gz \ 17 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 18 | -------------------------------------------------------------------------------- /src/runtime/5.0/alpine3.12/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:5.0-alpine3.12-amd64 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=5.0.3 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ 8 | && dotnet_sha512='85e4063792fb9d921a24f9da221a2b69c1faa253adb10644cc5907c35af92b3204f461fd6a9ec936ae37cfada47937f1c2b67174eabc778bd7305d66dc67e340' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/5.0/alpine3.12/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:5.0-alpine3.12-arm64v8 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=5.0.3 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-arm64.tar.gz \ 8 | && dotnet_sha512='caccb6854393ca922aec23c10e3451787b445a2dac1e9bd8be2d33f70258e247ac9f97860570c8fc6438a17d938a7a8c026dffeecc914f3afe1981a198432b03' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/5.0/alpine3.13/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:5.0-alpine3.13-amd64 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=5.0.3 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ 8 | && dotnet_sha512='85e4063792fb9d921a24f9da221a2b69c1faa253adb10644cc5907c35af92b3204f461fd6a9ec936ae37cfada47937f1c2b67174eabc778bd7305d66dc67e340' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/5.0/alpine3.13/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:5.0-alpine3.13-arm32v7 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=5.0.2 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-arm.tar.gz \ 8 | && dotnet_sha512='e608a714767c8ddb6c397a0bd67e493c8546cd0d47c4c393f95d16a9e6aef0949c535a5ab8f0ccfe0642456f29c69d1b9a99561b37b9d24180bcea7e9417d5eb' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/5.0/alpine3.13/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:5.0-alpine3.13-arm64v8 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=5.0.3 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-arm64.tar.gz \ 8 | && dotnet_sha512='caccb6854393ca922aec23c10e3451787b445a2dac1e9bd8be2d33f70258e247ac9f97860570c8fc6438a17d938a7a8c026dffeecc914f3afe1981a198432b03' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/5.0/buster-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:buster-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \ 10 | && dotnet_sha512='263dbe260123c3d6d706ed8b5f4d510d9384216422e9af0d293df87ed98e84e1e0ffbf0c7dd543c40c5ccc95bd7cd006c8bbbe9f1cd1f060b1eaa2f7a60fea74' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:5.0-buster-slim-amd64 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/5.0/buster-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:buster-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm.tar.gz \ 10 | && dotnet_sha512='d89c1769dfdfe30092825a94aa0037ca99ef83a0935ba24755377813db9e4a2e49e41611d02cf24aa4a423fb44bc566cdd935f62db61fe04a5257932bed4abf4' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:5.0-buster-slim-arm32v7 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/5.0/buster-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:buster-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm64.tar.gz \ 10 | && dotnet_sha512='f4d176b48714121040470a25f76a1b3554edb358953c1bfb39bd111cf0dcc85cb8a5ebcd617efd207b3cfaef0a2d242f94e9f018a186828a750c5c0dc9bd7da5' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:5.0-buster-slim-arm64v8 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/5.0/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:focal-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \ 10 | && dotnet_sha512='263dbe260123c3d6d706ed8b5f4d510d9384216422e9af0d293df87ed98e84e1e0ffbf0c7dd543c40c5ccc95bd7cd006c8bbbe9f1cd1f060b1eaa2f7a60fea74' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:5.0-focal-amd64 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/5.0/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:focal-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm.tar.gz \ 10 | && dotnet_sha512='d89c1769dfdfe30092825a94aa0037ca99ef83a0935ba24755377813db9e4a2e49e41611d02cf24aa4a423fb44bc566cdd935f62db61fe04a5257932bed4abf4' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:5.0-focal-arm32v7 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/5.0/focal/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=5.0.3 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:focal-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm64.tar.gz \ 10 | && dotnet_sha512='f4d176b48714121040470a25f76a1b3554edb358953c1bfb39bd111cf0dcc85cb8a5ebcd617efd207b3cfaef0a2d242f94e9f018a186828a750c5c0dc9bd7da5' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:5.0-focal-arm64v8 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/5.0/windowsservercore-ltsc2019/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | FROM mcr.microsoft.com/windows/servercore:ltsc2019-amd64 4 | 5 | ENV ` 6 | # Configure web servers to bind to port 80 when present 7 | ASPNETCORE_URLS=http://+:80 ` 8 | # Enable detection of running in a container 9 | DOTNET_RUNNING_IN_CONTAINER=true ` 10 | DOTNET_VERSION=5.0.3 11 | 12 | RUN powershell -Command ` 13 | $ErrorActionPreference = 'Stop'; ` 14 | $ProgressPreference = 'SilentlyContinue'; ` 15 | ` 16 | # Install .NET 17 | Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Runtime/$Env:DOTNET_VERSION/dotnet-runtime-$Env:DOTNET_VERSION-win-x64.zip; ` 18 | $dotnet_sha512 = '1b29d6f51c11c2eb3101eb1cfd259deade6a4575e555e5a93839c37a9a14d7f81e7bb57d3e78d8957d7537d95a5db6577320d8e5e44d3bc70f33769f4fdd0aa9'; ` 19 | if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` 20 | Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` 21 | exit 1; ` 22 | }; ` 23 | ` 24 | mkdir $Env:ProgramFiles\dotnet; ` 25 | tar -C $Env:ProgramFiles\dotnet -oxzf dotnet.zip; ` 26 | Remove-Item -Force dotnet.zip 27 | 28 | RUN setx /M PATH "%PATH%;C:\Program Files\dotnet" 29 | -------------------------------------------------------------------------------- /src/runtime/6.0/alpine3.13/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:6.0-alpine3.13-amd64 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=6.0.0-preview.1.21102.12 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ 8 | && dotnet_sha512='06475f29a4bfc8af012a6560f26cfe9c32469263b7c690d73975a2a1790965b139c227dd72961488f774088c45a3ebc8955b13ed1ec070cec7dbda4b51ea4171' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/6.0/alpine3.13/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:6.0-alpine3.13-arm32v7 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=6.0.0-preview.1.21102.12 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-arm.tar.gz \ 8 | && dotnet_sha512='ec5f222ee0989a92f041796ba7bfbb82d8773839dc7233014469cc856e107943f1426e04ce2655421a93055753844a1ae667ff4d95f9bbfd741395bf72bce58a' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/6.0/alpine3.13/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | FROM $REPO:6.0-alpine3.13-arm64v8 3 | 4 | # Install .NET 5 | ENV DOTNET_VERSION=6.0.0-preview.1.21102.12 6 | 7 | RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-arm64.tar.gz \ 8 | && dotnet_sha512='d0e0fac6b159714070d7cb9ac9f184538a8805257b1a362613c28e63998b4439d5e42789c07330747a70704ef2cc5044eca4b269de4ee3f53de68b1af8cc3735' \ 9 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 10 | && mkdir -p /usr/share/dotnet \ 11 | && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ 12 | && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ 13 | && rm dotnet.tar.gz 14 | -------------------------------------------------------------------------------- /src/runtime/6.0/bullseye-slim/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=6.0.0-preview.1.21102.12 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:bullseye-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \ 10 | && dotnet_sha512='64114ea881981ed061eb22c97ae8cf5a85209b0a439d6640984e1b423bc934259bcd136484c26f038f19222a9068a5cd687229a8b9b0d0b55efacb0275da082d' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:6.0-bullseye-slim-amd64 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/6.0/bullseye-slim/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=6.0.0-preview.1.21102.12 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:bullseye-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm.tar.gz \ 10 | && dotnet_sha512='42d9046cef8beeec7774e81cb160fff99d700a78f2e1d26b8a471dec4e727414e65197994ce200785b22d5f073e6402afdb92e62fc86ea38fc8814a1de52f6eb' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:6.0-bullseye-slim-arm32v7 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/6.0/bullseye-slim/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=6.0.0-preview.1.21102.12 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:bullseye-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm64.tar.gz \ 10 | && dotnet_sha512='4844ab4ce5750d45b552c2bca3a507dae0202f8be7d990506a66940158666897077c0d045b7a7e136a772da3a18b2cf81c932b5874747268aece6846fdc44bb8' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:6.0-bullseye-slim-arm64v8 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/6.0/focal/amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=6.0.0-preview.1.21102.12 3 | 4 | # Installer image 5 | FROM amd64/buildpack-deps:focal-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \ 10 | && dotnet_sha512='64114ea881981ed061eb22c97ae8cf5a85209b0a439d6640984e1b423bc934259bcd136484c26f038f19222a9068a5cd687229a8b9b0d0b55efacb0275da082d' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:6.0-focal-amd64 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/6.0/focal/arm32v7/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=6.0.0-preview.1.21102.12 3 | 4 | # Installer image 5 | FROM arm32v7/buildpack-deps:focal-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm.tar.gz \ 10 | && dotnet_sha512='42d9046cef8beeec7774e81cb160fff99d700a78f2e1d26b8a471dec4e727414e65197994ce200785b22d5f073e6402afdb92e62fc86ea38fc8814a1de52f6eb' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:6.0-focal-arm32v7 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /src/runtime/6.0/focal/arm64v8/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG REPO=mcr.microsoft.com/dotnet/runtime-deps 2 | ARG DOTNET_VERSION=6.0.0-preview.1.21102.12 3 | 4 | # Installer image 5 | FROM arm64v8/buildpack-deps:focal-curl as installer 6 | ARG DOTNET_VERSION 7 | 8 | # Retrieve .NET 9 | RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-arm64.tar.gz \ 10 | && dotnet_sha512='4844ab4ce5750d45b552c2bca3a507dae0202f8be7d990506a66940158666897077c0d045b7a7e136a772da3a18b2cf81c932b5874747268aece6846fdc44bb8' \ 11 | && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ 12 | && mkdir -p /dotnet \ 13 | && tar -ozxf dotnet.tar.gz -C /dotnet \ 14 | && rm dotnet.tar.gz 15 | 16 | 17 | # .NET runtime image 18 | FROM $REPO:6.0-focal-arm64v8 19 | ARG DOTNET_VERSION 20 | 21 | ENV DOTNET_VERSION=$DOTNET_VERSION 22 | 23 | COPY --from=installer ["/dotnet", "/usr/share/dotnet"] 24 | 25 | RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 26 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/Arch.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace Microsoft.DotNet.Docker.Tests 6 | { 7 | public enum Arch 8 | { 9 | Amd64, 10 | Arm, 11 | Arm64, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Xunit; 6 | 7 | [assembly: CollectionBehavior(DisableTestParallelization = true)] 8 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/DotNetImageType.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace Microsoft.DotNet.Docker.Tests 6 | { 7 | public enum DotNetImageType 8 | { 9 | SDK, 10 | Runtime, 11 | Runtime_Deps, 12 | Aspnet, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/ImageVersion.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System; 6 | 7 | namespace Microsoft.DotNet.Docker.Tests 8 | { 9 | public static class ImageVersion 10 | { 11 | public static readonly Version V2_1 = new Version(2, 1); 12 | public static readonly Version V3_1 = new Version(3, 1); 13 | public static readonly Version V5_0 = new Version(5, 0); 14 | public static readonly Version V6_0 = new Version(6, 0); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/LinuxImageTheoryAttribute.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Xunit; 6 | 7 | namespace Microsoft.DotNet.Docker.Tests 8 | { 9 | public class LinuxImageTheoryAttribute : TheoryAttribute 10 | { 11 | public LinuxImageTheoryAttribute() 12 | { 13 | if (!DockerHelper.IsLinuxContainerModeEnabled) 14 | { 15 | Skip = "Linux image test not applicable when running in Windows Container mode"; 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/Microsoft.DotNet.Docker.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | PreserveNewest 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/Microsoft.DotNet.Docker.Tests.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26923.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Docker.Tests", "Microsoft.DotNet.Docker.Tests.csproj", "{C645FD53-8170-49F6-9ECB-B9C4B6683284}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {C645FD53-8170-49F6-9ECB-B9C4B6683284}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {C645FD53-8170-49F6-9ECB-B9C4B6683284}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {C645FD53-8170-49F6-9ECB-B9C4B6683284}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {C645FD53-8170-49F6-9ECB-B9C4B6683284}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {23A3AC51-ED6C-46EB-B451-EDEF76476E0D} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/RuntimeDepsImageTests.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Xunit; 6 | using Xunit.Abstractions; 7 | 8 | namespace Microsoft.DotNet.Docker.Tests 9 | { 10 | [Trait("Category", "runtime-deps")] 11 | public class RuntimeDepsImageTests : CommonRuntimeImageTests 12 | { 13 | public RuntimeDepsImageTests(ITestOutputHelper outputHelper) 14 | : base(outputHelper) 15 | { 16 | } 17 | 18 | protected override DotNetImageType ImageType => DotNetImageType.Runtime_Deps; 19 | 20 | [LinuxImageTheory] 21 | [MemberData(nameof(GetImageData))] 22 | public void VerifyEnvironmentVariables(ProductImageData imageData) 23 | { 24 | base.VerifyCommonEnvironmentVariables(imageData); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/SampleImageType.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace Microsoft.DotNet.Docker.Tests 6 | { 7 | public enum SampleImageType 8 | { 9 | Dotnetapp, 10 | Aspnetapp 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/SkippableTheoryAttribute.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.RegularExpressions; 6 | using Xunit; 7 | 8 | namespace Microsoft.DotNet.Docker.Tests 9 | { 10 | public class SkippableTheoryAttribute : TheoryAttribute 11 | { 12 | public SkippableTheoryAttribute(params string[] skippedOperatingSystems) 13 | { 14 | if (!string.IsNullOrEmpty(Config.Os) && Config.Os != "*") 15 | { 16 | string osPattern = 17 | Config.Os != null ? Config.GetFilterRegexPattern(Config.Os) : null; 18 | foreach (string skippedOperatingSystem in skippedOperatingSystems) 19 | { 20 | if (Regex.IsMatch(skippedOperatingSystem, osPattern, RegexOptions.IgnoreCase)) 21 | { 22 | Skip = $"{skippedOperatingSystem} is unsupported"; 23 | break; 24 | } 25 | } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace Microsoft.DotNet.Docker.Tests 6 | { 7 | public static class StringExtensions 8 | { 9 | public static string TrimEnd(this string source, string trimString) 10 | { 11 | while (source.EndsWith(trimString)) 12 | { 13 | source = source.Substring(0, source.Length - trimString.Length); 14 | } 15 | 16 | return source; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/TestAppArtifacts/.dockerignore: -------------------------------------------------------------------------------- 1 | **/bin 2 | **/obj 3 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/TestAppArtifacts/Dockerfile.linux: -------------------------------------------------------------------------------- 1 | ARG sdk_image 2 | ARG runtime_image 3 | ARG runtime_deps_image 4 | 5 | FROM $sdk_image as build 6 | 7 | EXPOSE 80 8 | 9 | WORKDIR app 10 | COPY NuGet.config . 11 | COPY *.csproj . 12 | RUN dotnet restore 13 | 14 | COPY . . 15 | RUN dotnet build --no-restore 16 | 17 | 18 | FROM build as publish_fx_dependent 19 | RUN dotnet publish --no-restore -c Release -o out 20 | 21 | 22 | FROM $runtime_image AS fx_dependent_app 23 | EXPOSE 80 24 | WORKDIR /app 25 | COPY --from=publish_fx_dependent /app/out ./ 26 | ENTRYPOINT ["dotnet", "app.dll"] 27 | 28 | 29 | FROM build as publish_self_contained 30 | ARG rid 31 | RUN dotnet publish -r $rid -c Release -o out 32 | 33 | 34 | FROM $runtime_deps_image AS self_contained_app 35 | EXPOSE 80 36 | WORKDIR /app 37 | COPY --from=publish_self_contained /app/out ./ 38 | ENTRYPOINT ["./app"] 39 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/TestAppArtifacts/Dockerfile.windows: -------------------------------------------------------------------------------- 1 | ARG sdk_image 2 | ARG runtime_image 3 | 4 | FROM $sdk_image as build 5 | 6 | EXPOSE 80 7 | 8 | WORKDIR app 9 | COPY NuGet.config . 10 | COPY *.csproj . 11 | RUN dotnet restore 12 | 13 | COPY . . 14 | RUN dotnet build --no-restore 15 | 16 | 17 | FROM build as publish_fx_dependent 18 | RUN dotnet publish --no-restore -c Release -o out 19 | 20 | 21 | FROM $runtime_image AS fx_dependent_app 22 | EXPOSE 80 23 | WORKDIR /app 24 | COPY --from=publish_fx_dependent /app/out ./ 25 | ENTRYPOINT ["dotnet", "app.dll"] 26 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/TestAppArtifacts/NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/Microsoft.DotNet.Docker.Tests/TestAppArtifacts/NuGet.config.nightly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | --------------------------------------------------------------------------------