Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions README.runtime-deps.md

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions eng/dockerfile-templates/Dockerfile.linux.install-deps
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,36 @@
set isAzureLinux to find(OS_VERSION, "cbl-mariner") >= 0 || find(OS_VERSION, "azurelinux") >= 0 ^
set isDistrolessAzureLinux to defined(match(OS_VERSION, "^cbl-mariner\d+\.\d+-distroless$")) || defined(match(OS_VERSION, "^azurelinux\d+\.\d+-distroless$")) ^
set isFullAzureLinux to isAzureLinux && !isDistrolessAzureLinux ^
set useLegacyPackageLayout to dotnetVersion = "6.0" ^

set dotnetDepsComment to "# .NET dependencies" ^

set zlibPkg to when(isUbuntu || isDebian, "zlib1g", "zlib") ^
set caCertsPkg to when(isDistrolessAzureLinux,
"prebuilt-ca-certificates",
when(isAlpine && dotnetVersion != "6.0",
"ca-certificates-bundle",
"ca-certificates"
)) ^

set basePkgs to when(isAzureLinux,
[
"glibc",
"libgcc",
"openssl-libs",
"zlib"
"openssl-libs"
],
when(isAlpine,
[
"libgcc",
cat("libssl", VARIABLES[cat("libssl|", OS_VERSION_BASE)]),
"zlib"
cat("libssl", VARIABLES[cat("libssl|", OS_VERSION_BASE)])
],
[
"libc6",
"libgcc-s1",
cat("libssl", VARIABLES[cat("libssl|", OS_VERSION_BASE)]),
"zlib1g"
cat("libssl", VARIABLES[cat("libssl|", OS_VERSION_BASE)])
]
)) ^
set basePkgs to when(dotnetVersion = "6.0" || dotnetVersion = "8.0", cat(basePkgs, [zlibPkg]), basePkgs) ^

set standardPkgs to sort(cat(basePkgs,
when(isAzureLinux || isAlpine,
[
Expand All @@ -45,6 +51,7 @@
"libstdc++6",
]
))) ^

set extraPkgs to sort(cat(standardPkgs,
when (isAzureLinux,
[
Expand All @@ -63,7 +70,7 @@
]
)))) ^

set legacyPkgs to when(isAlpine,
set net6Pkgs to when(isAlpine,
[
"krb5-libs",
"libgcc",
Expand Down Expand Up @@ -101,22 +108,16 @@
"zlib1g"
])) ^

set pkgs to when(useLegacyPackageLayout,
legacyPkgs,
set pkgs to when(dotnetVersion = "6.0",
net6Pkgs,
when(ARGS["is-aot"],
basePkgs,
when(ARGS["is-extra"] || isDebian || isUbuntu || isFullAzureLinux,
extraPkgs,
standardPkgs))) ^

set certsPkgName to when(isDistrolessAzureLinux,
"prebuilt-ca-certificates",
when(isAlpine && dotnetVersion != "6.0",
"ca-certificates-bundle",
"ca-certificates"
)) ^
set prefixPkgs to [
certsPkgName,
caCertsPkg,
"",
dotnetDepsComment
] ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
"ca-certificates_data",
"libc6_libs",
"libgcc-s1_libs",
cat(opensslPkg, "_libs"),
"zlib1g_libs"
cat(opensslPkg, "_libs")
] ^

set basePkgs to when (dotnetVersion = "6.0" || dotnetVersion = "8.0", cat(basePkgs, ["zlib1g_libs"]), basePkgs) ^

_ Arrays in cottle are actually key-value maps. Sorting the array sorts by value
but does not change the key value. In order to have the right index in the
array, we must call `cat` again to reset the indices (keys) in the map. ^
Expand Down
56 changes: 28 additions & 28 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/bookworm-slim/amd64",
"dockerfile": "src/runtime-deps/9.0/bookworm-slim/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "bookworm-slim",
Expand All @@ -1834,7 +1834,7 @@
},
{
"architecture": "arm",
"dockerfile": "src/runtime-deps/8.0/bookworm-slim/arm32v7",
"dockerfile": "src/runtime-deps/9.0/bookworm-slim/arm32v7",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "bookworm-slim",
Expand All @@ -1846,7 +1846,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/bookworm-slim/arm64v8",
"dockerfile": "src/runtime-deps/9.0/bookworm-slim/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "bookworm-slim",
Expand All @@ -1867,7 +1867,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/alpine3.20/amd64",
"dockerfile": "src/runtime-deps/9.0/alpine3.20/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "alpine3.20",
Expand All @@ -1879,7 +1879,7 @@
},
{
"architecture": "arm",
"dockerfile": "src/runtime-deps/8.0/alpine3.20/arm32v7",
"dockerfile": "src/runtime-deps/9.0/alpine3.20/arm32v7",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "alpine3.20",
Expand All @@ -1892,7 +1892,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/alpine3.20/arm64v8",
"dockerfile": "src/runtime-deps/9.0/alpine3.20/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "alpine3.20",
Expand All @@ -1914,7 +1914,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/alpine3.20-aot/amd64",
"dockerfile": "src/runtime-deps/9.0/alpine3.20-aot/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.aot",
"os": "linux",
"osVersion": "alpine3.20",
Expand All @@ -1935,7 +1935,7 @@
},
{
"architecture": "arm",
"dockerfile": "src/runtime-deps/8.0/alpine3.20-aot/arm32v7",
"dockerfile": "src/runtime-deps/9.0/alpine3.20-aot/arm32v7",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.aot",
"os": "linux",
"osVersion": "alpine3.20",
Expand All @@ -1958,7 +1958,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/alpine3.20-aot/arm64v8",
"dockerfile": "src/runtime-deps/9.0/alpine3.20-aot/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.aot",
"os": "linux",
"osVersion": "alpine3.20",
Expand Down Expand Up @@ -1989,7 +1989,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/alpine3.20-extra/amd64",
"dockerfile": "src/runtime-deps/9.0/alpine3.20-extra/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.extra",
"os": "linux",
"osVersion": "alpine3.20",
Expand All @@ -2010,7 +2010,7 @@
},
{
"architecture": "arm",
"dockerfile": "src/runtime-deps/8.0/alpine3.20-extra/arm32v7",
"dockerfile": "src/runtime-deps/9.0/alpine3.20-extra/arm32v7",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.extra",
"os": "linux",
"osVersion": "alpine3.20",
Expand All @@ -2032,7 +2032,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/alpine3.20-extra/arm64v8",
"dockerfile": "src/runtime-deps/9.0/alpine3.20-extra/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.extra",
"os": "linux",
"osVersion": "alpine3.20",
Expand Down Expand Up @@ -2062,7 +2062,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/noble/amd64",
"dockerfile": "src/runtime-deps/9.0/noble/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "noble",
Expand All @@ -2085,7 +2085,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/noble/arm64v8",
"dockerfile": "src/runtime-deps/9.0/noble/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "noble",
Expand All @@ -2105,7 +2105,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/noble-chiseled/amd64",
"dockerfile": "src/runtime-deps/9.0/noble-chiseled/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.chiseled-ubuntu",
"os": "linux",
"osVersion": "noble-chiseled",
Expand All @@ -2132,7 +2132,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/noble-chiseled/arm64v8",
"dockerfile": "src/runtime-deps/9.0/noble-chiseled/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.chiseled-ubuntu",
"os": "linux",
"osVersion": "noble-chiseled",
Expand Down Expand Up @@ -2189,7 +2189,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/noble-chiseled-aot/amd64",
"dockerfile": "src/runtime-deps/9.0/noble-chiseled-aot/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.chiseled-ubuntu.aot",
"os": "linux",
"osVersion": "noble-chiseled",
Expand All @@ -2209,7 +2209,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/noble-chiseled-aot/arm64v8",
"dockerfile": "src/runtime-deps/9.0/noble-chiseled-aot/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.chiseled-ubuntu.aot",
"os": "linux",
"osVersion": "noble-chiseled",
Expand Down Expand Up @@ -2260,7 +2260,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/noble-chiseled-extra/amd64",
"dockerfile": "src/runtime-deps/9.0/noble-chiseled-extra/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.chiseled-ubuntu.extra",
"os": "linux",
"osVersion": "noble-chiseled",
Expand All @@ -2280,7 +2280,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/noble-chiseled-extra/arm64v8",
"dockerfile": "src/runtime-deps/9.0/noble-chiseled-extra/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.chiseled-ubuntu.extra",
"os": "linux",
"osVersion": "noble-chiseled",
Expand Down Expand Up @@ -2330,7 +2330,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0/amd64",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "azurelinux3.0",
Expand All @@ -2341,7 +2341,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0/arm64v8",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "azurelinux3.0",
Expand All @@ -2361,7 +2361,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0-distroless/amd64",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0-distroless/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.distroless-mariner",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
Expand All @@ -2381,7 +2381,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0-distroless/arm64v8",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0-distroless/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.distroless-mariner",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
Expand Down Expand Up @@ -2410,7 +2410,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0-distroless-aot/amd64",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0-distroless-aot/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.distroless-mariner.aot",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
Expand All @@ -2430,7 +2430,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0-distroless-aot/arm64v8",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0-distroless-aot/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.distroless-mariner.aot",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
Expand Down Expand Up @@ -2459,7 +2459,7 @@
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0-distroless-extra/amd64",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0-distroless-extra/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.distroless-mariner.extra",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
Expand All @@ -2479,7 +2479,7 @@
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/azurelinux3.0-distroless-extra/arm64v8",
"dockerfile": "src/runtime-deps/9.0/azurelinux3.0-distroless-extra/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile.distroless-mariner.extra",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
Expand Down
28 changes: 28 additions & 0 deletions src/runtime-deps/9.0/alpine3.20-aot/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM amd64/alpine:3.20

ENV \
# UID of the non-root user 'app'
APP_UID=1654 \
# Configure web servers to bind to port 8080 when present
ASPNETCORE_HTTP_PORTS=8080 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
# Set the invariant mode since ICU package isn't included (see https://github.com/dotnet/announcements/issues/20)
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true

RUN apk add --upgrade --no-cache \
ca-certificates-bundle \
\
# .NET dependencies
libgcc \
libssl3

# Create a non-root user and group
RUN addgroup \
--gid=$APP_UID \
app \
&& adduser \
--uid=$APP_UID \
--ingroup=app \
--disabled-password \
app
Loading