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
4 changes: 2 additions & 2 deletions README.yarp.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ You can skip HTTPS validation for the OTLP endpoint only by passing the environm

Tags | Dockerfile | OS Version
-----------| -------------| -------------
2.3.0-preview.4, 2.3-preview, 2-preview, latest | [Dockerfile](src/yarp/2.3/azurelinux-distroless/amd64/Dockerfile) | Azure Linux 3.0
2.3.0-preview.5, 2.3-preview, 2-preview, latest | [Dockerfile](src/yarp/2.3/azurelinux-distroless/amd64/Dockerfile) | Azure Linux 3.0

### Linux arm64 Tags

Tags | Dockerfile | OS Version
-----------| -------------| -------------
2.3.0-preview.4, 2.3-preview, 2-preview, latest | [Dockerfile](src/yarp/2.3/azurelinux-distroless/arm64v8/Dockerfile) | Azure Linux 3.0
2.3.0-preview.5, 2.3-preview, 2-preview, latest | [Dockerfile](src/yarp/2.3/azurelinux-distroless/arm64v8/Dockerfile) | Azure Linux 3.0
<!--End of generated tags-->

*Tags not listed in the table above are not supported. See the [Supported Tags Policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md). See the [full list of tags](https://mcr.microsoft.com/v2/dotnet/nightly/yarp/tags/list) for all supported and unsupported tags.*
Expand Down
49 changes: 38 additions & 11 deletions eng/dockerfile-templates/Dockerfile.linux.download-appliance
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,53 @@

ARGS:
product : Product name, e.g. "yarp", "aspire-dashboard", etc.
productVersion : Version of the product that will be downloaded
download-url : URL to download the product from
sha : SHA512 checksum of the product archive
file-name : Name of the file to download, e.g. "yarp.zip"
extract-to : Directory where the product will be extracted to
file-name : (optional) Name of the file to download, e.g. "yarp.zip". If unspecified,
the file will be named automatically.
sha : SHA512 checksum of the product archive. Mutually exclusive with `sha-url`.
sha-url : URL to download the sha value from. Mutually exclusive with `sha`.
sha-url-is-bare : Whether the sha specified in `sha-url` contains only the sha value.
If false, the sha file is assumed to be in the standard linux format. (see `man sha512sum`)
^

set applianceUrlParts to split(ARGS["download-url"], "/") ^
set applianceFilename to when(ARGS["file-name"],
ARGS["file-name"],
applianceUrlParts[len(applianceUrlParts) - 1]) ^

set shaUrlParts to split(ARGS["sha-url"], "/") ^
set shaFileName to shaUrlParts[len(shaUrlParts) - 1] ^

set filesToDownload to when(ARGS["sha-url"],
[
["url": ARGS["download-url"]],
["url": ARGS["sha-url"]]
],
[
["url": ARGS["download-url"], "out-file": applianceFilename]
]
)

}}{{InsertTemplate("Dockerfile.linux.download-files", [
"files": [
["url": ARGS["download-url"], "out-file": ARGS["file-name"]]
]
"files": filesToDownload
])}} \
&& {{InsertTemplate("Dockerfile.linux.validate-checksum", [
"file": ARGS["file-name"],
&&{{if ARGS["sha-url"]: {{InsertTemplate("Dockerfile.linux.validate-checksum", [
"file": applianceFilename,
"sha-function": "512",
"sha-file-is-bare": ARGS["sha-url-is-bare"],
"sha-file": shaFileName
])}}}}{{if ARGS["sha"]: {{InsertTemplate("Dockerfile.linux.validate-checksum", [
"file": applianceFilename,
"sha-function": "512",
"sha": ARGS["sha"],
"sha-var-name": cat(ARGS["product"], "_sha512")
])}} \
])}}}} \
&& mkdir --parents {{ARGS["extract-to"]}} \
&& {{InsertTemplate("Dockerfile.linux.extract-file", [
"file": ARGS["file-name"],
"file": applianceFilename,
"dest-dir": ARGS["extract-to"]
])}} \
&& rm {{ARGS["file-name"]}}
&& rm {{if ARGS["sha-url"]: \
}}{{applianceFilename}}{{if ARGS["sha-url"]: \
{{shaFileName}}}}
11 changes: 6 additions & 5 deletions eng/dockerfile-templates/yarp/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
set installerImageTag to cat("mcr.microsoft.com/azurelinux", "/base/core:", OS_VERSION_NUMBER) ^

set baseUrl to VARIABLES[cat("yarp|", yarpMajorMinor, "|base-url|", VARIABLES["branch"])] ^
set baseChecksumUrl to VARIABLES[cat("yarp|", yarpMajorMinor, "|base-url|checksums|", VARIABLES["branch"])] ^
set isInternal to find(baseUrl, "artifacts.visualstudio.com") >= 0 ^

set buildVersion to VARIABLES[cat("yarp|", yarpMajorMinor, "|build-version")] ^
set yarpVersionVariable to when(find(buildVersion, '-rtm') >= 0 || find(buildVersion, '-servicing') >= 0, "product-version", "build-version") ^
set yarpVersion to VARIABLES[cat("yarp|", yarpMajorMinor, "|", yarpVersionVariable)] ^
set versionFolder to when(buildVersion != yarpVersion, buildVersion, '$yarp_version') ^

set downloadUrl to cat(baseUrl, "/reverse-proxy/", versionFolder, "/", "reverse-proxy-linux-", ARCH_SHORT, ".zip") ^
set outFile to "yarp.zip" ^
set downloadUrl to cat(baseUrl, "/reverse-proxy/", versionFolder, "/", "reverse-proxy-linux-", ARCH_SHORT, ".tar.gz") ^
set shaUrl to cat(baseChecksumUrl, "/reverse-proxy/", versionFolder, "/", "reverse-proxy-linux-", ARCH_SHORT, ".tar.gz.sha512") ^
set appDir to "/app" ^
set sha to VARIABLES[join(["yarp", yarpMajorMinor, "linux", ARCH_SHORT, "sha"], "|")]

Expand All @@ -24,16 +25,16 @@
FROM {{installerImageTag}} AS installer{{if isInternal:
ARG ACCESSTOKEN}}

{{InsertTemplate("../Dockerfile.linux.distroless-azurelinux-installer-prereqs", [ "is-zip": "true" ])}}
{{InsertTemplate("../Dockerfile.linux.distroless-azurelinux-installer-prereqs")}}

# Retrieve YARP
RUN yarp_version={{yarpVersion}} \
&& {{InsertTemplate("../Dockerfile.linux.download-appliance", [
"product": "yarp",
"productVersion": yarpVersion,
"download-url": downloadUrl,
"sha": sha,
"file-name": outFile,
"sha-url": shaUrl,
"sha-url-is-bare": "true",
"extract-to": appDir
], " ")}}

Expand Down
8 changes: 4 additions & 4 deletions manifest.versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@
"powershell|10.0|Linux|x64|sha": "92ba2a8344f13d1c640f73d61488a582bae3ea82e4d00aad02efece3475f852855fb6f8ac37f72b4a14cdc1975af9f253d59ce72e36f3653e6b1ee87dc273f8f",
"powershell|10.0|Windows|x64|sha": "a529408a93ca2be753d84137bff8ed95dc9301faf2da62fbd9d7bfb29fe502bfca9427736b1004884e839e3f2585ac613349f0fbbb97ea6f979b115dcf06aa0c",

"yarp|2.3|build-version": "3.0.0-preview.1.25373.1",
"yarp|2.3|product-version": "2.3.0-preview.4",
"yarp|2.3|build-version": "3.0.0-preview.1.25375.1",
"yarp|2.3|product-version": "2.3.0-preview.5",
"yarp|2.3|fixed-tag": "$(yarp|2.3|product-version)",
"yarp|2.3|minor-tag": "2.3-preview",
"yarp|2|major-tag": "2-preview",
"yarp|2.3|linux|x64|sha": "10776172585027337222f7a0e0c496cc942edbfdc934c16d61d874be9b6d313f620db3ca1cad7fd06fbbce0e2b35b74be0ce9cafeb56e0c7dbaacfa7c5609c33",
"yarp|2.3|linux|arm64|sha": "db90bd806de2592a87860e295d5b10ec382e708f3384ac0e740cc73811b6866c5cb01947bda8afa961ccb2fda5f9c1784fe76e47b82db01da836bc09e027cc41",
"yarp|2.3|base-url|main": "$(base-url|public|preview|nightly)",
"yarp|2.3|base-url|nightly": "$(base-url|public|preview|nightly)",
"yarp|2.3|base-url|checksums|main": "$(base-url|public-checksums|preview|nightly)",
"yarp|2.3|base-url|checksums|nightly": "$(base-url|public-checksums|preview|nightly)",
"yarp|2.3|dotnet-version": "9.0",

"rocks-toolbox|latest|url": "https://raw.githubusercontent.com/canonical/rocks-toolbox",
Expand Down
18 changes: 11 additions & 7 deletions src/yarp/2.3/azurelinux-distroless/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer

RUN tdnf install -y \
ca-certificates \
unzip \
gzip \
tar \
&& tdnf clean all

# Retrieve YARP
RUN yarp_version=3.0.0-preview.1.25373.1 \
&& curl --fail --show-error --location --output yarp.zip https://ci.dot.net/public/reverse-proxy/$yarp_version/reverse-proxy-linux-x64.zip \
&& yarp_sha512='10776172585027337222f7a0e0c496cc942edbfdc934c16d61d874be9b6d313f620db3ca1cad7fd06fbbce0e2b35b74be0ce9cafeb56e0c7dbaacfa7c5609c33' \
&& echo "$yarp_sha512 yarp.zip" | sha512sum -c - \
RUN yarp_version=3.0.0-preview.1.25375.1 \
&& curl --fail --show-error --location \
--remote-name https://ci.dot.net/public/reverse-proxy/$yarp_version/reverse-proxy-linux-x64.tar.gz \
--remote-name https://ci.dot.net/public-checksums/reverse-proxy/$yarp_version/reverse-proxy-linux-x64.tar.gz.sha512 \
&& echo "$(cat reverse-proxy-linux-x64.tar.gz.sha512) reverse-proxy-linux-x64.tar.gz" | sha512sum -c - \
&& mkdir --parents /app \
&& unzip yarp.zip -d /app \
&& rm yarp.zip
&& tar --gzip --extract --no-same-owner --file reverse-proxy-linux-x64.tar.gz --directory /app \
&& rm \
reverse-proxy-linux-x64.tar.gz \
reverse-proxy-linux-x64.tar.gz.sha512


# YARP image
Expand Down
18 changes: 11 additions & 7 deletions src/yarp/2.3/azurelinux-distroless/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer

RUN tdnf install -y \
ca-certificates \
unzip \
gzip \
tar \
&& tdnf clean all

# Retrieve YARP
RUN yarp_version=3.0.0-preview.1.25373.1 \
&& curl --fail --show-error --location --output yarp.zip https://ci.dot.net/public/reverse-proxy/$yarp_version/reverse-proxy-linux-arm64.zip \
&& yarp_sha512='db90bd806de2592a87860e295d5b10ec382e708f3384ac0e740cc73811b6866c5cb01947bda8afa961ccb2fda5f9c1784fe76e47b82db01da836bc09e027cc41' \
&& echo "$yarp_sha512 yarp.zip" | sha512sum -c - \
RUN yarp_version=3.0.0-preview.1.25375.1 \
&& curl --fail --show-error --location \
--remote-name https://ci.dot.net/public/reverse-proxy/$yarp_version/reverse-proxy-linux-arm64.tar.gz \
--remote-name https://ci.dot.net/public-checksums/reverse-proxy/$yarp_version/reverse-proxy-linux-arm64.tar.gz.sha512 \
&& echo "$(cat reverse-proxy-linux-arm64.tar.gz.sha512) reverse-proxy-linux-arm64.tar.gz" | sha512sum -c - \
&& mkdir --parents /app \
&& unzip yarp.zip -d /app \
&& rm yarp.zip
&& tar --gzip --extract --no-same-owner --file reverse-proxy-linux-arm64.tar.gz --directory /app \
&& rm \
reverse-proxy-linux-arm64.tar.gz \
reverse-proxy-linux-arm64.tar.gz.sha512


# YARP image
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.