Skip to content

Commit

Permalink
Merge pull request #483 from infosiftr/dind-git
Browse files Browse the repository at this point in the history
Add `git` to `dind` variants (and make `git` an alias of `dind`, for 24.x and 25.x)
  • Loading branch information
yosifkit authored Feb 26, 2024
2 parents c0a2a6d + 485fefe commit 843eb46
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 62 deletions.
18 changes: 6 additions & 12 deletions 24/dind/Dockerfile

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

9 changes: 0 additions & 9 deletions 24/git/Dockerfile

This file was deleted.

18 changes: 6 additions & 12 deletions 25/dind/Dockerfile

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

9 changes: 0 additions & 9 deletions 25/git/Dockerfile

This file was deleted.

18 changes: 6 additions & 12 deletions Dockerfile-dind.template
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
{{ include "shared" -}}
FROM docker:{{ env.version }}-cli

# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
# https://github.com/moby/moby/blob/0eecd59153c03ced5f5ddd79cc98f29e4d86daec/project/PACKAGERS.md#runtime-dependencies
# https://github.com/docker/docker-ce-packaging/blob/963aa02666035d4e268f33c63d7868d6cdd1d34c/deb/common/control#L28-L41
RUN set -eux; \
apk add --no-cache \
btrfs-progs \
e2fsprogs \
e2fsprogs-extra \
git \
ip6tables \
iptables \
openssl \
pigz \
shadow-uidmap \
xfsprogs \
xz \
# pigz: https://github.com/moby/moby/pull/35697 (faster gzip implementation)
pigz \
; \
# only install zfs if it's available for the current architecture
# https://git.alpinelinux.org/cgit/aports/tree/main/zfs/APKBUILD?h=3.6-stable#n9 ("all !armhf !ppc64le" as of 2017-11-01)
# "apk info XYZ" exits with a zero exit code but no output when the package exists but not for this arch
if zfs="$(apk info --no-cache --quiet zfs)" && [ -n "$zfs" ]; then \
apk add --no-cache zfs; \
fi

# TODO aufs-tools
zfs \
;

# dind might be used on systems where the nf_tables kernel module isn't available. In that case,
# we need to switch over to xtables-legacy. See https://github.com/docker-library/docker/issues/463
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile-git.template

This file was deleted.

10 changes: 8 additions & 2 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ versionArches() {

comm -12 \
<(
version="$version" jq -r '
version="$version" jq -r --arg selector "$selector" '
.[env.version].arches | to_entries[]
| select(.value.'"$selector"')
| select(.value[$selector])
| .key
' versions.json | sort
) \
Expand Down Expand Up @@ -175,6 +175,12 @@ for version; do
suiteAliases=( "${suiteAliases[@]//latest-/}" )
variantAliases+=( "${suiteAliases[@]}" )
if [ "$variant" = 'dind' ]; then
# add "git" aliases https://github.com/docker-library/docker/issues/482#issuecomment-1955609423
if [ "$version" = '24' ] || [ "$version" = '25' ]; then
gitAliases=( "${versionAliases[@]/%/-git}" )
gitAliases=( "${gitAliases[@]//latest-/}" )
variantAliases+=( "${gitAliases[@]}" )
fi
# add "latest" aliases
suiteAliases=( "${versionAliases[0]}" ) # only "X.Y.Z-foo"
suiteAliases=( "${suiteAliases[@]/%/-alpine$alpine}" )
Expand Down
2 changes: 0 additions & 2 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
"cli",
"dind",
"dind-rootless",
"git",
"windows/windowsservercore-ltsc2022",
"windows/windowsservercore-1809"
],
Expand Down Expand Up @@ -276,7 +275,6 @@
"cli",
"dind",
"dind-rootless",
"git",
"windows/windowsservercore-ltsc2022",
"windows/windowsservercore-1809"
],
Expand Down
1 change: 0 additions & 1 deletion versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ for version in "${versions[@]}"; do
cli \
dind \
dind-rootless \
git \
windows/windowsservercore-ltsc2022 \
windows/windowsservercore-1809 \
; do
Expand Down

0 comments on commit 843eb46

Please sign in to comment.