Skip to content

Commit

Permalink
Merge pull request #315 from infosiftr/arm64-rootless-extras
Browse files Browse the repository at this point in the history
Enable rootless-extras on arm64 for 20.10+
  • Loading branch information
tianon committed Jul 12, 2021
2 parents 2a72a42 + 2ab877f commit bd0faef
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
3 changes: 3 additions & 0 deletions 20.10-rc/dind-rootless/Dockerfile

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

3 changes: 3 additions & 0 deletions 20.10/dind-rootless/Dockerfile

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

6 changes: 4 additions & 2 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"dockerUrl": "https://download.docker.com/linux/static/stable/armhf/docker-20.10.7.tgz"
},
"arm64v8": {
"dockerUrl": "https://download.docker.com/linux/static/stable/aarch64/docker-20.10.7.tgz"
"dockerUrl": "https://download.docker.com/linux/static/stable/aarch64/docker-20.10.7.tgz",
"rootlessExtrasUrl": "https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.7.tgz"
},
"windows-amd64": {
"dockerUrl": "https://download.docker.com/win/static/stable/x86_64/docker-20.10.7.zip"
Expand Down Expand Up @@ -95,7 +96,8 @@
"dockerUrl": "https://download.docker.com/linux/static/test/armhf/docker-20.10.0-rc2.tgz"
},
"arm64v8": {
"dockerUrl": "https://download.docker.com/linux/static/test/aarch64/docker-20.10.0-rc2.tgz"
"dockerUrl": "https://download.docker.com/linux/static/test/aarch64/docker-20.10.0-rc2.tgz",
"rootlessExtrasUrl": "https://download.docker.com/linux/static/test/aarch64/docker-rootless-extras-20.10.0-rc2.tgz"
}
},
"dindCommit": "42b1175eda071c0e9121e1d64345928384a93df1",
Expand Down
26 changes: 17 additions & 9 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,24 @@ for version in "${versions[@]}"; do
continue # Windows doesn't have rootless extras :)
fi

rootlessExtrasUrl="https://download.docker.com/linux/static/$channel/$arch/docker-rootless-extras-$fullVersion.tgz"
# https://github.com/docker/docker-ce/blob/8fb3bb7b2210789a4471c017561c1b0de0b4f145/components/engine/hack/make/binary-daemon#L24
# "vpnkit is amd64-only" ... for now??
if [ "$bashbrewArch" = 'amd64' ] && wget --quiet --spider "$rootlessExtrasUrl" &> /dev/null; then
export rootlessExtrasUrl
doc="$(
jq <<<"$doc" -c \
'.arches[env.bashbrewArch].rootlessExtrasUrl = env.rootlessExtrasUrl'
)"
if [ "$rcVersion" = '19.03' ] && [ "$bashbrewArch" != 'amd64' ]; then
# https://github.com/moby/moby/blob/v19.03.15/hack/make/binary-daemon#L24
# "vpnkit is amd64 only"
continue
fi
# https://github.com/moby/moby/blob/v20.10.7/hack/make/binary-daemon#L24
# "vpnkit is available for x86_64 and aarch64"
case "$bashbrewArch" in
amd64 | arm64v8)
rootlessExtrasUrl="https://download.docker.com/linux/static/$channel/$arch/docker-rootless-extras-$fullVersion.tgz"
if wget --quiet --spider "$rootlessExtrasUrl" &> /dev/null; then
export rootlessExtrasUrl
doc="$(jq <<<"$doc" -c '
.arches[env.bashbrewArch].rootlessExtrasUrl = env.rootlessExtrasUrl
')"
fi
;;
esac
done

# order here controls the order of the library/ file
Expand Down

0 comments on commit bd0faef

Please sign in to comment.