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
7 changes: 7 additions & 0 deletions 29-rc/cli/Dockerfile

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

2 changes: 2 additions & 0 deletions 29-rc/dind-rootless/Dockerfile

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

7 changes: 7 additions & 0 deletions 29-rc/dind/Dockerfile

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

10 changes: 7 additions & 3 deletions 29-rc/windows/windowsservercore-ltsc2022/Dockerfile

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

10 changes: 7 additions & 3 deletions 29-rc/windows/windowsservercore-ltsc2025/Dockerfile

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

2 changes: 1 addition & 1 deletion Dockerfile-cli.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN set -eux; \
download({
arches: .arches,
urlKey: "dockerUrl",
# TODO sha256Key (once Docker publishes them 😭)
sha256Key: "dockerSha256",
target: "docker.tgz",
})
}}; \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-dind-rootless.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN set -eux; \
download({
arches: .arches,
urlKey: "rootlessExtrasUrl",
# TODO sha256Key (once Docker publishes them 😭)
sha256Key: "rootlessExtrasSha256",
target: "rootless.tgz",
})
}}; \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-dind.template
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RUN set -eux; \
download({
arches: .arches,
urlKey: "dockerUrl",
# TODO sha256Key (once Docker publishes them 😭)
sha256Key: "dockerSha256",
target: "docker.tgz",
})
}}; \
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile-windows-servercore.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@ RUN $newPath = ('{0}\docker;{1}' -f $env:ProgramFiles, $env:PATH); \

ENV DOCKER_VERSION {{ .version }}
ENV DOCKER_URL {{ .arches["windows-amd64"].dockerUrl }}
{{ if .arches["windows-amd64"].dockerSha256 then ( -}}
ENV DOCKER_SHA256 {{ .arches["windows-amd64"].dockerSha256 }}
{{ ) else ( -}}
{{ # TODO remove this whole else block! as of 29.10.0-rc.1, we have checksums 🥳 -}}
# TODO ENV DOCKER_SHA256
# https://github.com/docker/docker-ce/blob/5b073ee2cf564edee5adca05eee574142f7627bb/components/packaging/static/hash_files !!
# (no SHA file artifacts on download.docker.com yet as of 2017-06-07 though)
{{ ) end -}}

RUN Write-Host ('Downloading {0} ...' -f $env:DOCKER_URL); \
Invoke-WebRequest -Uri $env:DOCKER_URL -OutFile 'docker.zip'; \
\
{{ if .arches["windows-amd64"].dockerSha256 then ( -}}
Write-Host ('Verifying sha256 ({0}) ...' -f $env:DOCKER_SHA256); \
if ((Get-FileHash docker.zip -Algorithm sha256).Hash -ne $env:DOCKER_SHA256) { \
Write-Host 'FAILED!'; \
exit 1; \
}; \
\
{{ ) else "" end -}}
Write-Host 'Expanding ...'; \
Expand-Archive docker.zip -DestinationPath $env:ProgramFiles; \
# (this archive has a "docker/..." directory in it already)
Expand Down
8 changes: 4 additions & 4 deletions shared.jq
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ def download(opts):
| .value
| .[opts.urlKey] as $url
| (if $notSha256 then "none" else .[opts.sha256Key] end) as $sha256
| select($apkArch and $url and $sha256)
| select($apkArch and $url)
| ("
\($apkArch | @sh))
url=\($url | @sh);"
+ if $notSha256 then "" else "
+ if $notSha256 or ($sha256 == null) then "" else "
sha256=\($sha256 | @sh);"
end + "
;;"
Expand All @@ -57,9 +57,9 @@ def download(opts):

wget -O \(opts.target | @sh) \"$url\";"
,
if $notSha256 then "" else "
if opts.sha256Key and all(opts.arches[]; has(opts.sha256Key)) then "
echo \"$sha256 *\"\(opts.target | @sh) | sha256sum -c -;"
end
else "" end
] | add
| rtrimstr(";")
| gsub("(?<=[^[:space:]])\n"; " \\\n")
Expand Down
9 changes: 9 additions & 0 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,26 +182,35 @@
"29-rc": {
"arches": {
"amd64": {
"dockerSha256": "d023bcab935f045548c5df79ea96d1f3fccbc091cf9a8347139154859f4767b8",
"dockerUrl": "https://download.docker.com/linux/static/test/x86_64/docker-29.10.0-rc.1.tgz",
"rootlessExtrasSha256": "e63ea3c6e4a28575be61bae88303b335c9637198d79a1b1aaae17ad0f955abc9",
"rootlessExtrasUrl": "https://download.docker.com/linux/static/test/x86_64/docker-rootless-extras-29.10.0-rc.1.tgz"
},
"arm32v6": {
"dockerSha256": "55aedd3f6b42d8dd3e397358f0ca4fb321cb89cce325b9a239842866ecee3f8f",
"dockerUrl": "https://download.docker.com/linux/static/test/armel/docker-29.10.0-rc.1.tgz"
},
"arm32v7": {
"dockerSha256": "d244956ea5ba6b9ca88acd24b6cc67ee5bd56c39f1d870a8d317ec472b0cc223",
"dockerUrl": "https://download.docker.com/linux/static/test/armhf/docker-29.10.0-rc.1.tgz"
},
"arm64v8": {
"dockerSha256": "48348b68501015c3d9cc2c2a0344588eb0676cf68c38dd4ffd881a75e2d8662c",
"dockerUrl": "https://download.docker.com/linux/static/test/aarch64/docker-29.10.0-rc.1.tgz",
"rootlessExtrasSha256": "2db6e2f180b66a4b5f6555f56041c85e55537230aaf939fdf18d60e1cea59c9e",
"rootlessExtrasUrl": "https://download.docker.com/linux/static/test/aarch64/docker-rootless-extras-29.10.0-rc.1.tgz"
},
"ppc64le": {
"dockerSha256": "1db34bee3e77a4af021631a5492b9385c3aafedd1b2aa3f693a60ca6760a3315",
"dockerUrl": "https://download.docker.com/linux/static/test/ppc64le/docker-29.10.0-rc.1.tgz"
},
"s390x": {
"dockerSha256": "78546fc2dcf04c7844e3e3f54b05485da64c852fceee453f2c8bac7b4ecd896b",
"dockerUrl": "https://download.docker.com/linux/static/test/s390x/docker-29.10.0-rc.1.tgz"
},
"windows-amd64": {
"dockerSha256": "d3f21d8d1487ee8a0bc936cb65c5149b1f5bebe2d05499c6bcfdcd8b81030c7b",
"dockerUrl": "https://download.docker.com/win/static/test/x86_64/docker-29.10.0-rc.1.zip"
}
},
Expand Down
30 changes: 28 additions & 2 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,18 @@ for version in "${versions[@]}"; do
else
continue
fi
if sha256="$(_curl "$url.sha256")"; then
sha256="${sha256%% *}"
if [[ ! "$sha256" =~ ^[[:xdigit:]]{64}$ ]]; then
echo >&2 "error: invalid checksum for $url: '$sha256'"
exit 1
fi

export sha256
doc="$(jq <<<"$doc" -c '
.arches[env.bashbrewArch].dockerSha256 = env.sha256
')"
fi
hasArches["$bashbrewArch"]=1

if [ -n "$windows" ]; then
Expand All @@ -241,9 +252,24 @@ for version in "${versions[@]}"; do
amd64 | arm64v8)
rootlessExtrasUrl="https://download.docker.com/linux/static/$channel/$arch/docker-rootless-extras-$fullVersion.tgz"
if _curl --head "$rootlessExtrasUrl" > /dev/null; then
export rootlessExtrasUrl
if rootlessExtrasSha256="$(_curl "$rootlessExtrasUrl.sha256")"; then
rootlessExtrasSha256="${rootlessExtrasSha256%% *}"
if [[ ! "$rootlessExtrasSha256" =~ ^[[:xdigit:]]{64}$ ]]; then
echo >&2 "error: invalid checksum for $rootlessExtrasUrl: '$rootlessExtrasSha256'"
exit 1
fi
else
rootlessExtrasSha256=
fi

export rootlessExtrasUrl rootlessExtrasSha256
doc="$(jq <<<"$doc" -c '
.arches[env.bashbrewArch].rootlessExtrasUrl = env.rootlessExtrasUrl
.arches[env.bashbrewArch] |= (
.rootlessExtrasUrl = env.rootlessExtrasUrl
| if env.rootlessExtrasSha256 != "" then
.rootlessExtrasSha256 = env.rootlessExtrasSha256
end
)
')"
fi
;;
Expand Down
Loading