From 644ee1af6b7b4268399dd51fe268a48be70f4c66 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 16 Jan 2024 16:16:30 -0800 Subject: [PATCH 1/2] Adjust tarball creation to be reproducible --- Dockerfile-builder.template | 25 +++++++++++++++++++++---- build.sh | 12 +++++++++++- latest-1/glibc/Dockerfile.builder | 23 +++++++++++++++++++---- latest-1/musl/Dockerfile.builder | 23 ++++++++++++++++++++--- latest-1/uclibc/Dockerfile.builder | 21 ++++++++++++++++++--- latest/glibc/Dockerfile.builder | 23 +++++++++++++++++++---- latest/musl/Dockerfile.builder | 23 ++++++++++++++++++++--- latest/uclibc/Dockerfile.builder | 21 ++++++++++++++++++--- 8 files changed, 146 insertions(+), 25 deletions(-) diff --git a/Dockerfile-builder.template b/Dockerfile-builder.template index 3205698c..68c81ef7 100644 --- a/Dockerfile-builder.template +++ b/Dockerfile-builder.template @@ -13,6 +13,8 @@ RUN set -eux; \ musl-dev \ patch \ tzdata \ +# busybox's tar ironically does not maintain mtime of directories correctly (which we need for SOURCE_DATE_EPOCH / reproducibility) + tar \ ; {{ ) else ( -}} FROM debian:bookworm-slim @@ -234,14 +236,28 @@ RUN set -eux; \ curl -fL -o busybox.tar.bz2 "https://busybox.net/downloads/$tarball"; \ echo "$BUSYBOX_SHA256 *busybox.tar.bz2" | sha256sum -c -; \ gpg --batch --verify busybox.tar.bz2.sig busybox.tar.bz2; \ - mkdir -p /usr/src/busybox; \ - tar -xf busybox.tar.bz2 -C /usr/src/busybox --strip-components 1; \ - rm busybox.tar.bz2* +# Alpine... 😅 + mkdir -p /usr/src; \ + tar -xf busybox.tar.bz2 -C /usr/src "busybox-$BUSYBOX_VERSION"; \ + mv "/usr/src/busybox-$BUSYBOX_VERSION" /usr/src/busybox; \ + rm busybox.tar.bz2*; \ + \ +# save the tarball's filesystem timestamp persistently (in case building busybox modifies it) so we can use it for reproducible rootfs later + SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/src/busybox | tee /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/src/busybox.SOURCE_DATE_EPOCH; \ +# for logging validation/edification + date --date "@$SOURCE_DATE_EPOCH" --rfc-2822 WORKDIR /usr/src/busybox RUN set -eux; \ \ +# build date/time gets embedded in the BusyBox binary -- SOURCE_DATE_EPOCH should override that + SOURCE_DATE_EPOCH="$(cat /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + export SOURCE_DATE_EPOCH; \ +# (has to be set in the config stage for making sure "AUTOCONF_TIMESTAMP" is embedded correctly) + \ setConfs=' \ CONFIG_AR=y \ CONFIG_FEATURE_AR_CREATE=y \ @@ -249,7 +265,7 @@ RUN set -eux; \ # CONFIG_LAST_SUPPORTED_WCHAR: see https://github.com/docker-library/busybox/issues/13 (UTF-8 input) CONFIG_LAST_SUPPORTED_WCHAR=0 \ {{ if env.variant == "glibc" then ( -}} -# As long as we rely on libnss (see below), we have to have libc.so anyhow, so we've removed CONFIG_STATIC here... :cry: +# As long as we rely on libnss (see below), we have to have libc.so anyhow, so we've removed CONFIG_STATIC here... 😭 {{ ) else ( -}} CONFIG_STATIC=y \ {{ ) end -}} @@ -361,6 +377,7 @@ RUN set -eux; \ {{ ) else "" end -}} chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ +# TODO make this create symlinks instead so the output tarball is cleaner (but "-s" outputs absolute symlinks which is kind of annoying to deal with -- we should also consider letting busybox determine the "install paths"; see "busybox --list-full") chroot rootfs /bin/busybox --install /bin # install a few extra files from buildroot (/etc/passwd, etc) diff --git a/build.sh b/build.sh index 8943ff00..003d7627 100755 --- a/build.sh +++ b/build.sh @@ -13,7 +13,17 @@ for dir; do ( set -x docker build -t "$base-builder" -f "$dir/Dockerfile.builder" "$dir" - docker run --rm "$base-builder" tar cC rootfs . | xz -T0 -z9 > "$dir/busybox.tar.xz" + docker run --rm "$base-builder" \ + tar \ + --create \ + --directory rootfs \ + --numeric-owner \ + --transform 's,^./,,' \ + --sort name \ + --mtime /usr/src/busybox.SOURCE_DATE_EPOCH --clamp-mtime \ + . \ + | xz -T0 -z9 > "$dir/busybox.tar.xz" + sha256sum "$dir/busybox.tar.xz" docker build -t "$base-test" "$dir" docker run --rm "$base-test" sh -xec 'true' diff --git a/latest-1/glibc/Dockerfile.builder b/latest-1/glibc/Dockerfile.builder index 37033f48..5d676984 100644 --- a/latest-1/glibc/Dockerfile.builder +++ b/latest-1/glibc/Dockerfile.builder @@ -34,21 +34,35 @@ RUN set -eux; \ curl -fL -o busybox.tar.bz2 "https://busybox.net/downloads/$tarball"; \ echo "$BUSYBOX_SHA256 *busybox.tar.bz2" | sha256sum -c -; \ gpg --batch --verify busybox.tar.bz2.sig busybox.tar.bz2; \ - mkdir -p /usr/src/busybox; \ - tar -xf busybox.tar.bz2 -C /usr/src/busybox --strip-components 1; \ - rm busybox.tar.bz2* +# Alpine... 😅 + mkdir -p /usr/src; \ + tar -xf busybox.tar.bz2 -C /usr/src "busybox-$BUSYBOX_VERSION"; \ + mv "/usr/src/busybox-$BUSYBOX_VERSION" /usr/src/busybox; \ + rm busybox.tar.bz2*; \ + \ +# save the tarball's filesystem timestamp persistently (in case building busybox modifies it) so we can use it for reproducible rootfs later + SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/src/busybox | tee /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/src/busybox.SOURCE_DATE_EPOCH; \ +# for logging validation/edification + date --date "@$SOURCE_DATE_EPOCH" --rfc-2822 WORKDIR /usr/src/busybox RUN set -eux; \ \ +# build date/time gets embedded in the BusyBox binary -- SOURCE_DATE_EPOCH should override that + SOURCE_DATE_EPOCH="$(cat /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + export SOURCE_DATE_EPOCH; \ +# (has to be set in the config stage for making sure "AUTOCONF_TIMESTAMP" is embedded correctly) + \ setConfs=' \ CONFIG_AR=y \ CONFIG_FEATURE_AR_CREATE=y \ CONFIG_FEATURE_AR_LONG_FILENAMES=y \ # CONFIG_LAST_SUPPORTED_WCHAR: see https://github.com/docker-library/busybox/issues/13 (UTF-8 input) CONFIG_LAST_SUPPORTED_WCHAR=0 \ -# As long as we rely on libnss (see below), we have to have libc.so anyhow, so we've removed CONFIG_STATIC here... :cry: +# As long as we rely on libnss (see below), we have to have libc.so anyhow, so we've removed CONFIG_STATIC here... 😭 '; \ \ unsetConfs=' \ @@ -130,6 +144,7 @@ RUN set -eux; \ done; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ +# TODO make this create symlinks instead so the output tarball is cleaner (but "-s" outputs absolute symlinks which is kind of annoying to deal with -- we should also consider letting busybox determine the "install paths"; see "busybox --list-full") chroot rootfs /bin/busybox --install /bin # install a few extra files from buildroot (/etc/passwd, etc) diff --git a/latest-1/musl/Dockerfile.builder b/latest-1/musl/Dockerfile.builder index 06c60e07..3000924e 100644 --- a/latest-1/musl/Dockerfile.builder +++ b/latest-1/musl/Dockerfile.builder @@ -18,6 +18,8 @@ RUN set -eux; \ musl-dev \ patch \ tzdata \ +# busybox's tar ironically does not maintain mtime of directories correctly (which we need for SOURCE_DATE_EPOCH / reproducibility) + tar \ ; # pub 1024D/ACC9965B 2006-12-12 @@ -36,14 +38,28 @@ RUN set -eux; \ curl -fL -o busybox.tar.bz2 "https://busybox.net/downloads/$tarball"; \ echo "$BUSYBOX_SHA256 *busybox.tar.bz2" | sha256sum -c -; \ gpg --batch --verify busybox.tar.bz2.sig busybox.tar.bz2; \ - mkdir -p /usr/src/busybox; \ - tar -xf busybox.tar.bz2 -C /usr/src/busybox --strip-components 1; \ - rm busybox.tar.bz2* +# Alpine... 😅 + mkdir -p /usr/src; \ + tar -xf busybox.tar.bz2 -C /usr/src "busybox-$BUSYBOX_VERSION"; \ + mv "/usr/src/busybox-$BUSYBOX_VERSION" /usr/src/busybox; \ + rm busybox.tar.bz2*; \ + \ +# save the tarball's filesystem timestamp persistently (in case building busybox modifies it) so we can use it for reproducible rootfs later + SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/src/busybox | tee /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/src/busybox.SOURCE_DATE_EPOCH; \ +# for logging validation/edification + date --date "@$SOURCE_DATE_EPOCH" --rfc-2822 WORKDIR /usr/src/busybox RUN set -eux; \ \ +# build date/time gets embedded in the BusyBox binary -- SOURCE_DATE_EPOCH should override that + SOURCE_DATE_EPOCH="$(cat /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + export SOURCE_DATE_EPOCH; \ +# (has to be set in the config stage for making sure "AUTOCONF_TIMESTAMP" is embedded correctly) + \ setConfs=' \ CONFIG_AR=y \ CONFIG_FEATURE_AR_CREATE=y \ @@ -110,6 +126,7 @@ RUN set -eux; \ gcc -o rootfs/bin/getconf -static -Os /usr/src/getconf.c; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ +# TODO make this create symlinks instead so the output tarball is cleaner (but "-s" outputs absolute symlinks which is kind of annoying to deal with -- we should also consider letting busybox determine the "install paths"; see "busybox --list-full") chroot rootfs /bin/busybox --install /bin # install a few extra files from buildroot (/etc/passwd, etc) diff --git a/latest-1/uclibc/Dockerfile.builder b/latest-1/uclibc/Dockerfile.builder index 23f930fa..12a38938 100644 --- a/latest-1/uclibc/Dockerfile.builder +++ b/latest-1/uclibc/Dockerfile.builder @@ -220,14 +220,28 @@ RUN set -eux; \ curl -fL -o busybox.tar.bz2 "https://busybox.net/downloads/$tarball"; \ echo "$BUSYBOX_SHA256 *busybox.tar.bz2" | sha256sum -c -; \ gpg --batch --verify busybox.tar.bz2.sig busybox.tar.bz2; \ - mkdir -p /usr/src/busybox; \ - tar -xf busybox.tar.bz2 -C /usr/src/busybox --strip-components 1; \ - rm busybox.tar.bz2* +# Alpine... 😅 + mkdir -p /usr/src; \ + tar -xf busybox.tar.bz2 -C /usr/src "busybox-$BUSYBOX_VERSION"; \ + mv "/usr/src/busybox-$BUSYBOX_VERSION" /usr/src/busybox; \ + rm busybox.tar.bz2*; \ + \ +# save the tarball's filesystem timestamp persistently (in case building busybox modifies it) so we can use it for reproducible rootfs later + SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/src/busybox | tee /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/src/busybox.SOURCE_DATE_EPOCH; \ +# for logging validation/edification + date --date "@$SOURCE_DATE_EPOCH" --rfc-2822 WORKDIR /usr/src/busybox RUN set -eux; \ \ +# build date/time gets embedded in the BusyBox binary -- SOURCE_DATE_EPOCH should override that + SOURCE_DATE_EPOCH="$(cat /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + export SOURCE_DATE_EPOCH; \ +# (has to be set in the config stage for making sure "AUTOCONF_TIMESTAMP" is embedded correctly) + \ setConfs=' \ CONFIG_AR=y \ CONFIG_FEATURE_AR_CREATE=y \ @@ -285,6 +299,7 @@ RUN set -eux; \ ln -vL ../buildroot/output/target/usr/bin/getconf rootfs/bin/; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ +# TODO make this create symlinks instead so the output tarball is cleaner (but "-s" outputs absolute symlinks which is kind of annoying to deal with -- we should also consider letting busybox determine the "install paths"; see "busybox --list-full") chroot rootfs /bin/busybox --install /bin # install a few extra files from buildroot (/etc/passwd, etc) diff --git a/latest/glibc/Dockerfile.builder b/latest/glibc/Dockerfile.builder index c2333572..5e9323ef 100644 --- a/latest/glibc/Dockerfile.builder +++ b/latest/glibc/Dockerfile.builder @@ -34,21 +34,35 @@ RUN set -eux; \ curl -fL -o busybox.tar.bz2 "https://busybox.net/downloads/$tarball"; \ echo "$BUSYBOX_SHA256 *busybox.tar.bz2" | sha256sum -c -; \ gpg --batch --verify busybox.tar.bz2.sig busybox.tar.bz2; \ - mkdir -p /usr/src/busybox; \ - tar -xf busybox.tar.bz2 -C /usr/src/busybox --strip-components 1; \ - rm busybox.tar.bz2* +# Alpine... 😅 + mkdir -p /usr/src; \ + tar -xf busybox.tar.bz2 -C /usr/src "busybox-$BUSYBOX_VERSION"; \ + mv "/usr/src/busybox-$BUSYBOX_VERSION" /usr/src/busybox; \ + rm busybox.tar.bz2*; \ + \ +# save the tarball's filesystem timestamp persistently (in case building busybox modifies it) so we can use it for reproducible rootfs later + SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/src/busybox | tee /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/src/busybox.SOURCE_DATE_EPOCH; \ +# for logging validation/edification + date --date "@$SOURCE_DATE_EPOCH" --rfc-2822 WORKDIR /usr/src/busybox RUN set -eux; \ \ +# build date/time gets embedded in the BusyBox binary -- SOURCE_DATE_EPOCH should override that + SOURCE_DATE_EPOCH="$(cat /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + export SOURCE_DATE_EPOCH; \ +# (has to be set in the config stage for making sure "AUTOCONF_TIMESTAMP" is embedded correctly) + \ setConfs=' \ CONFIG_AR=y \ CONFIG_FEATURE_AR_CREATE=y \ CONFIG_FEATURE_AR_LONG_FILENAMES=y \ # CONFIG_LAST_SUPPORTED_WCHAR: see https://github.com/docker-library/busybox/issues/13 (UTF-8 input) CONFIG_LAST_SUPPORTED_WCHAR=0 \ -# As long as we rely on libnss (see below), we have to have libc.so anyhow, so we've removed CONFIG_STATIC here... :cry: +# As long as we rely on libnss (see below), we have to have libc.so anyhow, so we've removed CONFIG_STATIC here... 😭 '; \ \ unsetConfs=' \ @@ -128,6 +142,7 @@ RUN set -eux; \ done; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ +# TODO make this create symlinks instead so the output tarball is cleaner (but "-s" outputs absolute symlinks which is kind of annoying to deal with -- we should also consider letting busybox determine the "install paths"; see "busybox --list-full") chroot rootfs /bin/busybox --install /bin # install a few extra files from buildroot (/etc/passwd, etc) diff --git a/latest/musl/Dockerfile.builder b/latest/musl/Dockerfile.builder index 51881dfb..fe395ade 100644 --- a/latest/musl/Dockerfile.builder +++ b/latest/musl/Dockerfile.builder @@ -18,6 +18,8 @@ RUN set -eux; \ musl-dev \ patch \ tzdata \ +# busybox's tar ironically does not maintain mtime of directories correctly (which we need for SOURCE_DATE_EPOCH / reproducibility) + tar \ ; # pub 1024D/ACC9965B 2006-12-12 @@ -36,14 +38,28 @@ RUN set -eux; \ curl -fL -o busybox.tar.bz2 "https://busybox.net/downloads/$tarball"; \ echo "$BUSYBOX_SHA256 *busybox.tar.bz2" | sha256sum -c -; \ gpg --batch --verify busybox.tar.bz2.sig busybox.tar.bz2; \ - mkdir -p /usr/src/busybox; \ - tar -xf busybox.tar.bz2 -C /usr/src/busybox --strip-components 1; \ - rm busybox.tar.bz2* +# Alpine... 😅 + mkdir -p /usr/src; \ + tar -xf busybox.tar.bz2 -C /usr/src "busybox-$BUSYBOX_VERSION"; \ + mv "/usr/src/busybox-$BUSYBOX_VERSION" /usr/src/busybox; \ + rm busybox.tar.bz2*; \ + \ +# save the tarball's filesystem timestamp persistently (in case building busybox modifies it) so we can use it for reproducible rootfs later + SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/src/busybox | tee /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/src/busybox.SOURCE_DATE_EPOCH; \ +# for logging validation/edification + date --date "@$SOURCE_DATE_EPOCH" --rfc-2822 WORKDIR /usr/src/busybox RUN set -eux; \ \ +# build date/time gets embedded in the BusyBox binary -- SOURCE_DATE_EPOCH should override that + SOURCE_DATE_EPOCH="$(cat /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + export SOURCE_DATE_EPOCH; \ +# (has to be set in the config stage for making sure "AUTOCONF_TIMESTAMP" is embedded correctly) + \ setConfs=' \ CONFIG_AR=y \ CONFIG_FEATURE_AR_CREATE=y \ @@ -108,6 +124,7 @@ RUN set -eux; \ gcc -o rootfs/bin/getconf -static -Os /usr/src/getconf.c; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ +# TODO make this create symlinks instead so the output tarball is cleaner (but "-s" outputs absolute symlinks which is kind of annoying to deal with -- we should also consider letting busybox determine the "install paths"; see "busybox --list-full") chroot rootfs /bin/busybox --install /bin # install a few extra files from buildroot (/etc/passwd, etc) diff --git a/latest/uclibc/Dockerfile.builder b/latest/uclibc/Dockerfile.builder index 293eb8ca..89b806ec 100644 --- a/latest/uclibc/Dockerfile.builder +++ b/latest/uclibc/Dockerfile.builder @@ -220,14 +220,28 @@ RUN set -eux; \ curl -fL -o busybox.tar.bz2 "https://busybox.net/downloads/$tarball"; \ echo "$BUSYBOX_SHA256 *busybox.tar.bz2" | sha256sum -c -; \ gpg --batch --verify busybox.tar.bz2.sig busybox.tar.bz2; \ - mkdir -p /usr/src/busybox; \ - tar -xf busybox.tar.bz2 -C /usr/src/busybox --strip-components 1; \ - rm busybox.tar.bz2* +# Alpine... 😅 + mkdir -p /usr/src; \ + tar -xf busybox.tar.bz2 -C /usr/src "busybox-$BUSYBOX_VERSION"; \ + mv "/usr/src/busybox-$BUSYBOX_VERSION" /usr/src/busybox; \ + rm busybox.tar.bz2*; \ + \ +# save the tarball's filesystem timestamp persistently (in case building busybox modifies it) so we can use it for reproducible rootfs later + SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/src/busybox | tee /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/src/busybox.SOURCE_DATE_EPOCH; \ +# for logging validation/edification + date --date "@$SOURCE_DATE_EPOCH" --rfc-2822 WORKDIR /usr/src/busybox RUN set -eux; \ \ +# build date/time gets embedded in the BusyBox binary -- SOURCE_DATE_EPOCH should override that + SOURCE_DATE_EPOCH="$(cat /usr/src/busybox.SOURCE_DATE_EPOCH)"; \ + export SOURCE_DATE_EPOCH; \ +# (has to be set in the config stage for making sure "AUTOCONF_TIMESTAMP" is embedded correctly) + \ setConfs=' \ CONFIG_AR=y \ CONFIG_FEATURE_AR_CREATE=y \ @@ -283,6 +297,7 @@ RUN set -eux; \ ln -vL ../buildroot/output/target/usr/bin/getconf rootfs/bin/; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ +# TODO make this create symlinks instead so the output tarball is cleaner (but "-s" outputs absolute symlinks which is kind of annoying to deal with -- we should also consider letting busybox determine the "install paths"; see "busybox --list-full") chroot rootfs /bin/busybox --install /bin # install a few extra files from buildroot (/etc/passwd, etc) From 7e39d619fee7cb36e332636203c8ebd74b86200f Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 22 Feb 2024 13:27:48 -0800 Subject: [PATCH 2/2] Initial `Builder: oci-import` support --- .github/workflows/ci.yml | 13 +- .github/workflows/munge-build.sh | 10 +- .github/workflows/munge-debian-unstable.sh | 24 ---- .github/workflows/munge-unstable.sh | 19 +++ Dockerfile-builder.template | 5 +- Dockerfile.template | 4 +- apply-templates.sh | 4 + build.sh | 117 +++++++++++++++++- generate-stackbrew-library.sh | 23 ++-- hack-unstable.sh | 14 +++ latest-1/glibc/Dockerfile | 4 +- ...6382e0c0e03a0af3f239cd745424b06d3b4737f60e | 1 + ...98c5fdeae2e1e82b1f12a2bd052b4c22e1161f1bc0 | 1 + ...67a7e1e046766a57d2ebcf9b19723894e2a636aee1 | 1 + latest-1/glibc/amd64/image-config.json | 22 ++++ latest-1/glibc/amd64/image-manifest.json | 20 +++ latest-1/glibc/amd64/index.json | 19 +++ latest-1/glibc/amd64/oci-layout | 1 + latest-1/musl/Dockerfile | 4 +- latest-1/musl/Dockerfile.builder | 5 +- ...e6ec80548d6af2778301f3c88a57e4178d7aa16818 | 1 + ...1c6fefccdc40841c722a5ced84af57da7ccacce8e3 | 1 + ...3a43b42d5dae106e346115faf4b4604a51e63bd421 | 1 + latest-1/musl/amd64/image-config.json | 22 ++++ latest-1/musl/amd64/image-manifest.json | 20 +++ latest-1/musl/amd64/index.json | 19 +++ latest-1/musl/amd64/oci-layout | 1 + latest-1/uclibc/Dockerfile | 4 +- ...4211c7487091e110875f6d08fa59b23837e88392f4 | 1 + ...21ef54de4c7d93cf4b8844b5ea42d98d52fe736dda | 1 + ...a95b6e0df4bb783dbea338a47ccc296686e12751b6 | 1 + latest-1/uclibc/amd64/image-config.json | 22 ++++ latest-1/uclibc/amd64/image-manifest.json | 20 +++ latest-1/uclibc/amd64/index.json | 19 +++ latest-1/uclibc/amd64/oci-layout | 1 + latest/glibc/Dockerfile | 4 +- ...fa558bc637cf3a61baf40a708cb8fff532b39e52d0 | 1 + ...a5873eb246767bca37232dee1e7a3b8c9956bceb0c | 1 + ...e55cf9e63b068eb02946e3422d3587e8ce803b6aab | 1 + latest/glibc/amd64/image-config.json | 22 ++++ latest/glibc/amd64/image-manifest.json | 20 +++ latest/glibc/amd64/index.json | 19 +++ latest/glibc/amd64/oci-layout | 1 + latest/musl/Dockerfile | 4 +- latest/musl/Dockerfile.builder | 5 +- ...fe5656920e7bdd548e9fd8f50eab2be694102ae318 | 1 + ...9a7fcf10203c562c1f59586a6e2f39c903597bda34 | 1 + ...646fd30a36549d61bfbbdd7ad5d1d75b9d9e671297 | 1 + latest/musl/amd64/image-config.json | 22 ++++ latest/musl/amd64/image-manifest.json | 20 +++ latest/musl/amd64/index.json | 19 +++ latest/musl/amd64/oci-layout | 1 + latest/uclibc/Dockerfile | 4 +- ...c33548b6a813ce904b613f11f5e19e1ea70e9c49e8 | 1 + ...c934638e208c2e83f20c413323d373ff87f2a4bce0 | 1 + ...24cb3687b64060f91d9b44a695055a3475ac0dcd89 | 1 + latest/uclibc/amd64/image-config.json | 22 ++++ latest/uclibc/amd64/image-manifest.json | 20 +++ latest/uclibc/amd64/index.json | 19 +++ latest/uclibc/amd64/oci-layout | 1 + 60 files changed, 607 insertions(+), 50 deletions(-) delete mode 100755 .github/workflows/munge-debian-unstable.sh create mode 100755 .github/workflows/munge-unstable.sh create mode 100755 hack-unstable.sh create mode 120000 latest-1/glibc/amd64/blobs/sha256/1c10e93757391bd459976f6382e0c0e03a0af3f239cd745424b06d3b4737f60e create mode 120000 latest-1/glibc/amd64/blobs/sha256/be454047891e51dc9c733f98c5fdeae2e1e82b1f12a2bd052b4c22e1161f1bc0 create mode 120000 latest-1/glibc/amd64/blobs/sha256/da78e77ef445a26ffe297167a7e1e046766a57d2ebcf9b19723894e2a636aee1 create mode 100644 latest-1/glibc/amd64/image-config.json create mode 100644 latest-1/glibc/amd64/image-manifest.json create mode 100644 latest-1/glibc/amd64/index.json create mode 100644 latest-1/glibc/amd64/oci-layout create mode 120000 latest-1/musl/amd64/blobs/sha256/7e3712170429f1cb4fc838e6ec80548d6af2778301f3c88a57e4178d7aa16818 create mode 120000 latest-1/musl/amd64/blobs/sha256/ab169714e570fc081439d21c6fefccdc40841c722a5ced84af57da7ccacce8e3 create mode 120000 latest-1/musl/amd64/blobs/sha256/f36b741eb9675622ca20443a43b42d5dae106e346115faf4b4604a51e63bd421 create mode 100644 latest-1/musl/amd64/image-config.json create mode 100644 latest-1/musl/amd64/image-manifest.json create mode 100644 latest-1/musl/amd64/index.json create mode 100644 latest-1/musl/amd64/oci-layout create mode 120000 latest-1/uclibc/amd64/blobs/sha256/73845083f9a000342cd00a4211c7487091e110875f6d08fa59b23837e88392f4 create mode 120000 latest-1/uclibc/amd64/blobs/sha256/9bd3480f69f87f9c0c8ad221ef54de4c7d93cf4b8844b5ea42d98d52fe736dda create mode 120000 latest-1/uclibc/amd64/blobs/sha256/bc5a47da295fe344f245fda95b6e0df4bb783dbea338a47ccc296686e12751b6 create mode 100644 latest-1/uclibc/amd64/image-config.json create mode 100644 latest-1/uclibc/amd64/image-manifest.json create mode 100644 latest-1/uclibc/amd64/index.json create mode 100644 latest-1/uclibc/amd64/oci-layout create mode 120000 latest/glibc/amd64/blobs/sha256/4be429a5fbb2e71ae7958bfa558bc637cf3a61baf40a708cb8fff532b39e52d0 create mode 120000 latest/glibc/amd64/blobs/sha256/7b2699543f22d5b8dc8d66a5873eb246767bca37232dee1e7a3b8c9956bceb0c create mode 120000 latest/glibc/amd64/blobs/sha256/ba5dc23f65d4cc4a4535bce55cf9e63b068eb02946e3422d3587e8ce803b6aab create mode 100644 latest/glibc/amd64/image-config.json create mode 100644 latest/glibc/amd64/image-manifest.json create mode 100644 latest/glibc/amd64/index.json create mode 100644 latest/glibc/amd64/oci-layout create mode 120000 latest/musl/amd64/blobs/sha256/6e5e0f90c009d12db9478afe5656920e7bdd548e9fd8f50eab2be694102ae318 create mode 120000 latest/musl/amd64/blobs/sha256/b9d056b83bb6446fee29e89a7fcf10203c562c1f59586a6e2f39c903597bda34 create mode 120000 latest/musl/amd64/blobs/sha256/d6e6e2f0bb218b28aaad3f646fd30a36549d61bfbbdd7ad5d1d75b9d9e671297 create mode 100644 latest/musl/amd64/image-config.json create mode 100644 latest/musl/amd64/image-manifest.json create mode 100644 latest/musl/amd64/index.json create mode 100644 latest/musl/amd64/oci-layout create mode 120000 latest/uclibc/amd64/blobs/sha256/23c25518807a447b99381ac33548b6a813ce904b613f11f5e19e1ea70e9c49e8 create mode 120000 latest/uclibc/amd64/blobs/sha256/478851d8396007d974a545c934638e208c2e83f20c413323d373ff87f2a4bce0 create mode 120000 latest/uclibc/amd64/blobs/sha256/cd82127e91e4b4656e681824cb3687b64060f91d9b44a695055a3475ac0dcd89 create mode 100644 latest/uclibc/amd64/image-config.json create mode 100644 latest/uclibc/amd64/image-manifest.json create mode 100644 latest/uclibc/amd64/index.json create mode 100644 latest/uclibc/amd64/oci-layout diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00f76bdd..43551102 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: run: | strategy="$(GENERATE_STACKBREW_LIBRARY='.github/workflows/fake-gsl.sh' "$BASHBREW_SCRIPTS/github-actions/generate.sh")" strategy="$(.github/workflows/munge-build.sh -c <<<"$strategy")" - strategy="$(.github/workflows/munge-debian-unstable.sh -c <<<"$strategy")" + strategy="$(.github/workflows/munge-unstable.sh -c <<<"$strategy")" EOF="EOF-$RANDOM-$RANDOM-$RANDOM" echo "strategy<<$EOF" >> "$GITHUB_OUTPUT" @@ -47,8 +47,11 @@ jobs: strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }} name: ${{ matrix.name }} runs-on: ${{ matrix.os }} + env: + BASHBREW_ARCH: amd64 # TODO consider using "$BASHBREW_SCRIPTS/bashbrew-host-arch.sh" ? (would make it harder to force i386 in our matrix too, so explicit is probably better) steps: - uses: actions/checkout@v3 + - uses: docker-library/bashbrew@HEAD # build.sh needs bashbrew - name: Prepare Environment run: ${{ matrix.runs.prepare }} - name: Pull Dependencies @@ -61,3 +64,11 @@ jobs: run: ${{ matrix.runs.test }} - name: '"docker images"' run: ${{ matrix.runs.images }} + - name: Git Diff # see "munge-build.sh" + run: | + if git diff --exit-code */*/Dockerfile.builder; then # see "hack-unstable.sh" (and "munge-unstable.sh") + git diff --exit-code + else + # for unstable builds, let's leave this in but purely informational (instead of causing CI to fail) + git diff + fi diff --git a/.github/workflows/munge-build.sh b/.github/workflows/munge-build.sh index 768cafe5..ba799a5b 100755 --- a/.github/workflows/munge-build.sh +++ b/.github/workflows/munge-build.sh @@ -3,6 +3,14 @@ set -Eeuo pipefail jq ' .matrix.include |= map( - .runs.build = "./build.sh " + (.meta.entries[].directory | @sh) + "\n" + (.runs.build | sub(" --file [^ ]+ "; " ")) + .runs.build = ( + [ + "dir=" + (.meta.entries[].directory | @sh), + "rm -rf \"$dir/$BASHBREW_ARCH\"", # make sure our OCI directory is clean so we can "git diff --exit-code" later + "./build.sh \"$dir\"", + (.runs.build | sub(" --file [^ ]+ "; " ")), + empty + ] | join("\n") + ) ) ' "$@" diff --git a/.github/workflows/munge-debian-unstable.sh b/.github/workflows/munge-debian-unstable.sh deleted file mode 100755 index cb91e6e8..00000000 --- a/.github/workflows/munge-debian-unstable.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -jq ' - .matrix.include += [ - .matrix.include[] - | select(.name | test(" [(].+[)]") | not) # ignore any existing munged builds - | select(.os | startswith("windows-") | not) - | select(.meta.froms | any(startswith("debian:"))) - | .name += " (debian:unstable)" - | .runs.pull = ([ - "# pull debian:unstable variants of base images for Debian Ports architectures", - "# https://github.com/docker-library/oi-janky-groovy/blob/0f8796a8aeedca90aba0a7e102f35ea172a23bb3/tianon/busybox/arch-pipeline.groovy#L68-L71", - ( - .meta.froms[] - | (sub(":[^-]+"; ":unstable") | @sh) as $img - | ( - "docker pull " + $img, - "docker tag " + $img + " " + @sh - ) - ) - ] | join("\n")) - ] -' "$@" diff --git a/.github/workflows/munge-unstable.sh b/.github/workflows/munge-unstable.sh new file mode 100755 index 00000000..b0ebe082 --- /dev/null +++ b/.github/workflows/munge-unstable.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +# see also "hack-unstable.sh" +jq ' + .matrix.include += [ + .matrix.include[] + | select(.name | test(" [(].+[)]") | not) # ignore any existing munged builds + | select(.os | startswith("windows-") | not) + | select(.meta.froms | any(startswith("debian:") or startswith("alpine:"))) + | .name += " (unstable)" + | .runs.prepare += ([ + "./hack-unstable.sh " + (.meta.entries[].directory | @sh), + "if git diff --exit-code; then exit 1; fi", # trust, but verify (if hack-unstable did not modify anything, we want to bail quickly) + empty + ] | map("\n" + .) | add) + | .runs.pull = "" # pulling images does not make sense here (we just changed them) + ] +' "$@" diff --git a/Dockerfile-builder.template b/Dockerfile-builder.template index 68c81ef7..8c2c4956 100644 --- a/Dockerfile-builder.template +++ b/Dockerfile-builder.template @@ -368,11 +368,12 @@ RUN set -eux; \ done; \ {{ ) elif env.variant == "musl" then ( -}} # copy simplified getconf port from Alpine - aportsVersion="v$(cat /etc/alpine-release)"; \ +# https://github.com/alpinelinux/aports/commits/HEAD/main/musl/getconf.c curl -fsSL \ - "https://github.com/alpinelinux/aports/raw/$aportsVersion/main/musl/getconf.c" \ + "https://github.com/alpinelinux/aports/raw/48b16204aeeda5bc1f87e49c6b8e23d9abb07c73/main/musl/getconf.c" \ -o /usr/src/getconf.c \ ; \ + echo 'd87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c */usr/src/getconf.c' | sha256sum -c -; \ gcc -o rootfs/bin/getconf -static -Os /usr/src/getconf.c; \ {{ ) else "" end -}} chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ diff --git a/Dockerfile.template b/Dockerfile.template index 4c1acc7d..eb1261de 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,3 +1,5 @@ +# this isn't used for the official published images anymore, but is included for backwards compatibility +# see https://github.com/docker-library/bashbrew/issues/51 FROM scratch -ADD busybox.tar.xz / +ADD busybox.tar.gz / CMD ["sh"] diff --git a/apply-templates.sh b/apply-templates.sh index d2c517c3..74437b69 100755 --- a/apply-templates.sh +++ b/apply-templates.sh @@ -35,11 +35,15 @@ for version; do variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)" eval "variants=( $variants )" + # TODO somehow make sure this deletes any content we're not generating (without accidentally deleting potentialy generated tarballs for the things we *do* care about) + for variant in "${variants[@]}"; do export variant echo "processing $version/$variant ..." + mkdir -p "$version/$variant" + { generated_warning gawk -f "$jqt" Dockerfile-builder.template diff --git a/build.sh b/build.sh index 003d7627..edfcac81 100755 --- a/build.sh +++ b/build.sh @@ -8,11 +8,39 @@ if [ "$#" -eq 0 ]; then eval "set -- $dirs" fi +[ -n "$BASHBREW_ARCH" ] +platformString="$(bashbrew cat --format '{{ ociPlatform arch }}' <(echo 'Maintainers: empty hack (@example)'))" +platform="$(bashbrew cat --format '{{ ociPlatform arch | json }}' <(echo 'Maintainers: empty hack (@example)'))" + for dir; do - base="busybox:${dir////-}" + variant="$(basename "$dir")" + base="busybox:${dir////-}-$BASHBREW_ARCH" + + froms="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile.builder")" + for from in "$froms"; do + if ! bashbrew remote arches --json "$from" | jq -e '.arches | has(env.BASHBREW_ARCH)' > /dev/null; then + echo >&2 "warning: '$base' is 'FROM $from' which does not support '$BASHBREW_ARCH'; skipping" + continue 2 + fi + done + ( set -x - docker build -t "$base-builder" -f "$dir/Dockerfile.builder" "$dir" + + # TODO save the output of "bashbrew remote arches" above so we can "--build-context" here? + docker buildx build \ + --progress=plain \ + --platform "$platformString" \ + --pull \ + --load \ + --tag "$base-builder" \ + --file "$dir/Dockerfile.builder" \ + "$dir" + + oci="$dir/$BASHBREW_ARCH" + rm -rf "$oci" + mkdir "$oci" "$oci/blobs" "$oci/blobs/sha256" + docker run --rm "$base-builder" \ tar \ --create \ @@ -22,8 +50,89 @@ for dir; do --sort name \ --mtime /usr/src/busybox.SOURCE_DATE_EPOCH --clamp-mtime \ . \ - | xz -T0 -z9 > "$dir/busybox.tar.xz" - sha256sum "$dir/busybox.tar.xz" + > "$oci/rootfs.tar" + + # if we gzip separately, we can calculate the diffid without decompressing + diffId="$(sha256sum "$oci/rootfs.tar" | cut -d' ' -f1)" + diffId="sha256:$diffId" + + # we need to use the container's gzip so it's more likely reproducible over time (and using busybox's own gzip is a cute touch 😀) + docker run -i --rm "$base-builder" chroot rootfs gzip -c < "$oci/rootfs.tar" > "$oci/rootfs.tar.gz" + rm "$oci/rootfs.tar" + rootfs="$(sha256sum "$oci/rootfs.tar.gz" | cut -d' ' -f1)" + ln -svfT --relative "$oci/rootfs.tar.gz" "$oci/blobs/sha256/$rootfs" + rootfsSize="$(stat --format '%s' --dereference "$oci/blobs/sha256/$rootfs")" + rootfs="sha256:$rootfs" + + SOURCE_DATE_EPOCH="$(docker run --rm "$base-builder" cat /usr/src/busybox.SOURCE_DATE_EPOCH)" + createdBy="$(docker run --rm --env variant="$variant" "$base-builder" sh -euc '. /etc/os-release && echo "BusyBox $BUSYBOX_VERSION ($variant)${BUILDROOT_VERSION:+, Buildroot $BUILDROOT_VERSION}, ${NAME%% *} ${VERSION_ID:-$VERSION_CODENAME}"')" + jq -n --tab --arg SOURCE_DATE_EPOCH "$SOURCE_DATE_EPOCH" --arg diffId "$diffId" --arg createdBy "$createdBy" --argjson platform "$platform" ' + ($SOURCE_DATE_EPOCH | tonumber | strftime("%Y-%m-%dT%H:%M:%SZ")) as $created + | { + config: { + Cmd: [ "sh" ], + }, + created: $created, + history: [ { + created: $created, + created_by: $createdBy, + } ], + rootfs: { + type: "layers", + diff_ids: [ $diffId ], + }, + } + $platform + ' > "$oci/image-config.json" + config="$(sha256sum "$oci/image-config.json" | cut -d' ' -f1)" + ln -svfT --relative "$oci/image-config.json" "$oci/blobs/sha256/$config" + configSize="$(stat --format '%s' --dereference "$oci/blobs/sha256/$config")" + config="sha256:$config" + + version="$(cut <<<"$createdBy" -d' ' -f2)" # a better way to scrape the BusyBox version? maybe this is fine (want to avoid yet another container run) + jq -n --tab --arg version "$version" --arg variant "$variant" --arg config "$config" --arg configSize "$configSize" --arg rootfs "$rootfs" --arg rootfsSize "$rootfsSize" ' + { + schemaVersion: 2, + mediaType: "application/vnd.oci.image.manifest.v1+json", + config: { + mediaType: "application/vnd.oci.image.config.v1+json", + digest: $config, + size: ($configSize | tonumber), + }, + layers: [ { + mediaType: "application/vnd.oci.image.layer.v1.tar+gzip", + digest: $rootfs, + size: ($rootfsSize | tonumber), + } ], + annotations: { + "org.opencontainers.image.url": "https://github.com/docker-library/busybox", + "org.opencontainers.image.version": ($version + "-" + $variant), + }, + } + ' > "$oci/image-manifest.json" + manifest="$(sha256sum "$oci/image-manifest.json" | cut -d' ' -f1)" + ln -svfT --relative "$oci/image-manifest.json" "$oci/blobs/sha256/$manifest" + manifestSize="$(stat --format '%s' --dereference "$oci/blobs/sha256/$manifest")" + manifest="sha256:$manifest" + + jq -nc '{ imageLayoutVersion:"1.0.0" }' > "$oci/oci-layout" + jq -n --tab --arg version "$version" --arg variant "$variant" --arg manifest "$manifest" --arg manifestSize "$manifestSize" --argjson platform "$platform" ' + { + schemaVersion: 2, + mediaType: "application/vnd.oci.image.index.v1+json", + manifests: [ { + mediaType: "application/vnd.oci.image.manifest.v1+json", + digest: $manifest, + size: ($manifestSize | tonumber), + platform: $platform, + annotations: { + "org.opencontainers.image.ref.name": ("busybox:" + $version + "-" + $variant), + "io.containerd.image.name": ("busybox:" + $version + "-" + $variant), + }, + } ], + } + ' > "$oci/index.json" + + ln -svfT --relative "$oci/rootfs.tar.gz" "$dir/busybox.tar.gz" docker build -t "$base-test" "$dir" docker run --rm "$base-test" sh -xec 'true' diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 49efad0d..9b8801da 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -34,6 +34,8 @@ Maintainers: Tianon Gravi (@tianon), Joseph Ferguson (@yosifkit) GitRepo: $gitHubUrl.git GitCommit: $selfCommit +Builder: oci-import +File: index.json EOH for arch in "${arches[@]}"; do commit="${archCommits[$arch]}" @@ -97,6 +99,7 @@ for version; do fi versionAliases+=( latest ) + actualArches=() declare -A archLatestDir=() for variant in "${variants[@]}"; do dir="$version/$variant" @@ -107,25 +110,31 @@ for version; do variantArches=() for arch in "${arches[@]}"; do archCommit="${archCommits[$arch]}" - if wget --quiet --spider -O /dev/null -o /dev/null "$rawGitUrl/$archCommit/$dir/busybox.tar.xz"; then + if wget --quiet --spider -O /dev/null -o /dev/null "$rawGitUrl/$archCommit/$dir/$arch/rootfs.tar.gz"; then variantArches+=( "$arch" ) - : "${archLatestDir[$arch]:=$dir}" # record the first supported directory per architecture for "latest" and friends + if [ -z "${archLatestDir[$arch]:-}" ]; then + # record the first supported directory per architecture for "latest" and friends + archLatestDir["$arch"]="$dir/$arch" + actualArches+=( "$arch" ) + fi fi done - if _tags "${variantAliases[@]}"; then + if [ "${#variantArches[@]}" -gt 0 ] && _tags "${variantAliases[@]}"; then cat <<-EOE Architectures: $(join ', ' "${variantArches[@]}") - Directory: $dir EOE + for arch in "${variantArches[@]}"; do + echo "$arch-Directory: $dir/$arch" + done fi done - if _tags "${versionAliases[@]}"; then + if [ "${#actualArches[@]}" -gt 0 ] && _tags "${versionAliases[@]}"; then cat <<-EOE - Architectures: $(join ', ' "${arches[@]}") + Architectures: $(join ', ' "${actualArches[@]}") EOE - for arch in "${arches[@]}"; do + for arch in "${actualArches[@]}"; do archDir="${archLatestDir[$arch]}" cat <<-EOA ${arch}-Directory: $archDir diff --git a/hack-unstable.sh b/hack-unstable.sh new file mode 100755 index 00000000..bbb2f70b --- /dev/null +++ b/hack-unstable.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +if [ "$#" -eq 0 ]; then + set -- */*/ +fi + +set -x + +# This is used to modify "Dockerfile.builder" for architectures that are not (yet) supported by stable releases (notably, riscv64). +sed -ri \ + -e 's/^(FROM debian:)[^ -]+/\1unstable/g' \ + -e 's/^(FROM alpine:)[^ -]+/\1edge/g' \ + "${@/%//Dockerfile.builder}" diff --git a/latest-1/glibc/Dockerfile b/latest-1/glibc/Dockerfile index 4c1acc7d..eb1261de 100644 --- a/latest-1/glibc/Dockerfile +++ b/latest-1/glibc/Dockerfile @@ -1,3 +1,5 @@ +# this isn't used for the official published images anymore, but is included for backwards compatibility +# see https://github.com/docker-library/bashbrew/issues/51 FROM scratch -ADD busybox.tar.xz / +ADD busybox.tar.gz / CMD ["sh"] diff --git a/latest-1/glibc/amd64/blobs/sha256/1c10e93757391bd459976f6382e0c0e03a0af3f239cd745424b06d3b4737f60e b/latest-1/glibc/amd64/blobs/sha256/1c10e93757391bd459976f6382e0c0e03a0af3f239cd745424b06d3b4737f60e new file mode 120000 index 00000000..c8bac38c --- /dev/null +++ b/latest-1/glibc/amd64/blobs/sha256/1c10e93757391bd459976f6382e0c0e03a0af3f239cd745424b06d3b4737f60e @@ -0,0 +1 @@ +../../image-config.json \ No newline at end of file diff --git a/latest-1/glibc/amd64/blobs/sha256/be454047891e51dc9c733f98c5fdeae2e1e82b1f12a2bd052b4c22e1161f1bc0 b/latest-1/glibc/amd64/blobs/sha256/be454047891e51dc9c733f98c5fdeae2e1e82b1f12a2bd052b4c22e1161f1bc0 new file mode 120000 index 00000000..980db356 --- /dev/null +++ b/latest-1/glibc/amd64/blobs/sha256/be454047891e51dc9c733f98c5fdeae2e1e82b1f12a2bd052b4c22e1161f1bc0 @@ -0,0 +1 @@ +../../rootfs.tar.gz \ No newline at end of file diff --git a/latest-1/glibc/amd64/blobs/sha256/da78e77ef445a26ffe297167a7e1e046766a57d2ebcf9b19723894e2a636aee1 b/latest-1/glibc/amd64/blobs/sha256/da78e77ef445a26ffe297167a7e1e046766a57d2ebcf9b19723894e2a636aee1 new file mode 120000 index 00000000..9530c85b --- /dev/null +++ b/latest-1/glibc/amd64/blobs/sha256/da78e77ef445a26ffe297167a7e1e046766a57d2ebcf9b19723894e2a636aee1 @@ -0,0 +1 @@ +../../image-manifest.json \ No newline at end of file diff --git a/latest-1/glibc/amd64/image-config.json b/latest-1/glibc/amd64/image-config.json new file mode 100644 index 00000000..c2d9ea35 --- /dev/null +++ b/latest-1/glibc/amd64/image-config.json @@ -0,0 +1,22 @@ +{ + "config": { + "Cmd": [ + "sh" + ] + }, + "created": "2021-12-26T16:56:57Z", + "history": [ + { + "created": "2021-12-26T16:56:57Z", + "created_by": "BusyBox 1.35.0 (glibc), Debian 12" + } + ], + "rootfs": { + "type": "layers", + "diff_ids": [ + "sha256:be94c013eea8cbd66c1fc201cd544144cf5befd123bececbe4ca2453e29314b6" + ] + }, + "architecture": "amd64", + "os": "linux" +} diff --git a/latest-1/glibc/amd64/image-manifest.json b/latest-1/glibc/amd64/image-manifest.json new file mode 100644 index 00000000..9fe95272 --- /dev/null +++ b/latest-1/glibc/amd64/image-manifest.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:1c10e93757391bd459976f6382e0c0e03a0af3f239cd745424b06d3b4737f60e", + "size": 372 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:be454047891e51dc9c733f98c5fdeae2e1e82b1f12a2bd052b4c22e1161f1bc0", + "size": 2148915 + } + ], + "annotations": { + "org.opencontainers.image.url": "https://github.com/docker-library/busybox", + "org.opencontainers.image.version": "1.35.0-glibc" + } +} diff --git a/latest-1/glibc/amd64/index.json b/latest-1/glibc/amd64/index.json new file mode 100644 index 00000000..5c78d247 --- /dev/null +++ b/latest-1/glibc/amd64/index.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.index.v1+json", + "manifests": [ + { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "digest": "sha256:da78e77ef445a26ffe297167a7e1e046766a57d2ebcf9b19723894e2a636aee1", + "size": 610, + "platform": { + "architecture": "amd64", + "os": "linux" + }, + "annotations": { + "org.opencontainers.image.ref.name": "busybox:1.35.0-glibc", + "io.containerd.image.name": "busybox:1.35.0-glibc" + } + } + ] +} diff --git a/latest-1/glibc/amd64/oci-layout b/latest-1/glibc/amd64/oci-layout new file mode 100644 index 00000000..d5e10fd6 --- /dev/null +++ b/latest-1/glibc/amd64/oci-layout @@ -0,0 +1 @@ +{"imageLayoutVersion":"1.0.0"} diff --git a/latest-1/musl/Dockerfile b/latest-1/musl/Dockerfile index 4c1acc7d..eb1261de 100644 --- a/latest-1/musl/Dockerfile +++ b/latest-1/musl/Dockerfile @@ -1,3 +1,5 @@ +# this isn't used for the official published images anymore, but is included for backwards compatibility +# see https://github.com/docker-library/bashbrew/issues/51 FROM scratch -ADD busybox.tar.xz / +ADD busybox.tar.gz / CMD ["sh"] diff --git a/latest-1/musl/Dockerfile.builder b/latest-1/musl/Dockerfile.builder index 3000924e..255d6c9c 100644 --- a/latest-1/musl/Dockerfile.builder +++ b/latest-1/musl/Dockerfile.builder @@ -118,11 +118,12 @@ RUN set -eux; \ ln -vL busybox rootfs/bin/; \ \ # copy simplified getconf port from Alpine - aportsVersion="v$(cat /etc/alpine-release)"; \ +# https://github.com/alpinelinux/aports/commits/HEAD/main/musl/getconf.c curl -fsSL \ - "https://github.com/alpinelinux/aports/raw/$aportsVersion/main/musl/getconf.c" \ + "https://github.com/alpinelinux/aports/raw/48b16204aeeda5bc1f87e49c6b8e23d9abb07c73/main/musl/getconf.c" \ -o /usr/src/getconf.c \ ; \ + echo 'd87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c */usr/src/getconf.c' | sha256sum -c -; \ gcc -o rootfs/bin/getconf -static -Os /usr/src/getconf.c; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ diff --git a/latest-1/musl/amd64/blobs/sha256/7e3712170429f1cb4fc838e6ec80548d6af2778301f3c88a57e4178d7aa16818 b/latest-1/musl/amd64/blobs/sha256/7e3712170429f1cb4fc838e6ec80548d6af2778301f3c88a57e4178d7aa16818 new file mode 120000 index 00000000..980db356 --- /dev/null +++ b/latest-1/musl/amd64/blobs/sha256/7e3712170429f1cb4fc838e6ec80548d6af2778301f3c88a57e4178d7aa16818 @@ -0,0 +1 @@ +../../rootfs.tar.gz \ No newline at end of file diff --git a/latest-1/musl/amd64/blobs/sha256/ab169714e570fc081439d21c6fefccdc40841c722a5ced84af57da7ccacce8e3 b/latest-1/musl/amd64/blobs/sha256/ab169714e570fc081439d21c6fefccdc40841c722a5ced84af57da7ccacce8e3 new file mode 120000 index 00000000..9530c85b --- /dev/null +++ b/latest-1/musl/amd64/blobs/sha256/ab169714e570fc081439d21c6fefccdc40841c722a5ced84af57da7ccacce8e3 @@ -0,0 +1 @@ +../../image-manifest.json \ No newline at end of file diff --git a/latest-1/musl/amd64/blobs/sha256/f36b741eb9675622ca20443a43b42d5dae106e346115faf4b4604a51e63bd421 b/latest-1/musl/amd64/blobs/sha256/f36b741eb9675622ca20443a43b42d5dae106e346115faf4b4604a51e63bd421 new file mode 120000 index 00000000..c8bac38c --- /dev/null +++ b/latest-1/musl/amd64/blobs/sha256/f36b741eb9675622ca20443a43b42d5dae106e346115faf4b4604a51e63bd421 @@ -0,0 +1 @@ +../../image-config.json \ No newline at end of file diff --git a/latest-1/musl/amd64/image-config.json b/latest-1/musl/amd64/image-config.json new file mode 100644 index 00000000..efc89caa --- /dev/null +++ b/latest-1/musl/amd64/image-config.json @@ -0,0 +1,22 @@ +{ + "config": { + "Cmd": [ + "sh" + ] + }, + "created": "2021-12-26T16:56:57Z", + "history": [ + { + "created": "2021-12-26T16:56:57Z", + "created_by": "BusyBox 1.35.0 (musl), Alpine 3.19.1" + } + ], + "rootfs": { + "type": "layers", + "diff_ids": [ + "sha256:e81af897a6ed42bf107335af397aee8b165cb545b01ebdda4cbd9fff72c51fdb" + ] + }, + "architecture": "amd64", + "os": "linux" +} diff --git a/latest-1/musl/amd64/image-manifest.json b/latest-1/musl/amd64/image-manifest.json new file mode 100644 index 00000000..c241cad5 --- /dev/null +++ b/latest-1/musl/amd64/image-manifest.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:f36b741eb9675622ca20443a43b42d5dae106e346115faf4b4604a51e63bd421", + "size": 375 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:7e3712170429f1cb4fc838e6ec80548d6af2778301f3c88a57e4178d7aa16818", + "size": 849546 + } + ], + "annotations": { + "org.opencontainers.image.url": "https://github.com/docker-library/busybox", + "org.opencontainers.image.version": "1.35.0-musl" + } +} diff --git a/latest-1/musl/amd64/index.json b/latest-1/musl/amd64/index.json new file mode 100644 index 00000000..2121aee3 --- /dev/null +++ b/latest-1/musl/amd64/index.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.index.v1+json", + "manifests": [ + { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "digest": "sha256:ab169714e570fc081439d21c6fefccdc40841c722a5ced84af57da7ccacce8e3", + "size": 608, + "platform": { + "architecture": "amd64", + "os": "linux" + }, + "annotations": { + "org.opencontainers.image.ref.name": "busybox:1.35.0-musl", + "io.containerd.image.name": "busybox:1.35.0-musl" + } + } + ] +} diff --git a/latest-1/musl/amd64/oci-layout b/latest-1/musl/amd64/oci-layout new file mode 100644 index 00000000..d5e10fd6 --- /dev/null +++ b/latest-1/musl/amd64/oci-layout @@ -0,0 +1 @@ +{"imageLayoutVersion":"1.0.0"} diff --git a/latest-1/uclibc/Dockerfile b/latest-1/uclibc/Dockerfile index 4c1acc7d..eb1261de 100644 --- a/latest-1/uclibc/Dockerfile +++ b/latest-1/uclibc/Dockerfile @@ -1,3 +1,5 @@ +# this isn't used for the official published images anymore, but is included for backwards compatibility +# see https://github.com/docker-library/bashbrew/issues/51 FROM scratch -ADD busybox.tar.xz / +ADD busybox.tar.gz / CMD ["sh"] diff --git a/latest-1/uclibc/amd64/blobs/sha256/73845083f9a000342cd00a4211c7487091e110875f6d08fa59b23837e88392f4 b/latest-1/uclibc/amd64/blobs/sha256/73845083f9a000342cd00a4211c7487091e110875f6d08fa59b23837e88392f4 new file mode 120000 index 00000000..c8bac38c --- /dev/null +++ b/latest-1/uclibc/amd64/blobs/sha256/73845083f9a000342cd00a4211c7487091e110875f6d08fa59b23837e88392f4 @@ -0,0 +1 @@ +../../image-config.json \ No newline at end of file diff --git a/latest-1/uclibc/amd64/blobs/sha256/9bd3480f69f87f9c0c8ad221ef54de4c7d93cf4b8844b5ea42d98d52fe736dda b/latest-1/uclibc/amd64/blobs/sha256/9bd3480f69f87f9c0c8ad221ef54de4c7d93cf4b8844b5ea42d98d52fe736dda new file mode 120000 index 00000000..9530c85b --- /dev/null +++ b/latest-1/uclibc/amd64/blobs/sha256/9bd3480f69f87f9c0c8ad221ef54de4c7d93cf4b8844b5ea42d98d52fe736dda @@ -0,0 +1 @@ +../../image-manifest.json \ No newline at end of file diff --git a/latest-1/uclibc/amd64/blobs/sha256/bc5a47da295fe344f245fda95b6e0df4bb783dbea338a47ccc296686e12751b6 b/latest-1/uclibc/amd64/blobs/sha256/bc5a47da295fe344f245fda95b6e0df4bb783dbea338a47ccc296686e12751b6 new file mode 120000 index 00000000..980db356 --- /dev/null +++ b/latest-1/uclibc/amd64/blobs/sha256/bc5a47da295fe344f245fda95b6e0df4bb783dbea338a47ccc296686e12751b6 @@ -0,0 +1 @@ +../../rootfs.tar.gz \ No newline at end of file diff --git a/latest-1/uclibc/amd64/image-config.json b/latest-1/uclibc/amd64/image-config.json new file mode 100644 index 00000000..b9c7fea0 --- /dev/null +++ b/latest-1/uclibc/amd64/image-config.json @@ -0,0 +1,22 @@ +{ + "config": { + "Cmd": [ + "sh" + ] + }, + "created": "2021-12-26T16:56:57Z", + "history": [ + { + "created": "2021-12-26T16:56:57Z", + "created_by": "BusyBox 1.35.0 (uclibc), Buildroot 2023.11.1, Debian 12" + } + ], + "rootfs": { + "type": "layers", + "diff_ids": [ + "sha256:091fda9c6234d04b8dad2a58ab716d819a8ed19d9d967681d8c84f38a8a5ec9a" + ] + }, + "architecture": "amd64", + "os": "linux" +} diff --git a/latest-1/uclibc/amd64/image-manifest.json b/latest-1/uclibc/amd64/image-manifest.json new file mode 100644 index 00000000..cecc4b49 --- /dev/null +++ b/latest-1/uclibc/amd64/image-manifest.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:73845083f9a000342cd00a4211c7487091e110875f6d08fa59b23837e88392f4", + "size": 394 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:bc5a47da295fe344f245fda95b6e0df4bb783dbea338a47ccc296686e12751b6", + "size": 754106 + } + ], + "annotations": { + "org.opencontainers.image.url": "https://github.com/docker-library/busybox", + "org.opencontainers.image.version": "1.35.0-uclibc" + } +} diff --git a/latest-1/uclibc/amd64/index.json b/latest-1/uclibc/amd64/index.json new file mode 100644 index 00000000..ce0fce0f --- /dev/null +++ b/latest-1/uclibc/amd64/index.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.index.v1+json", + "manifests": [ + { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "digest": "sha256:9bd3480f69f87f9c0c8ad221ef54de4c7d93cf4b8844b5ea42d98d52fe736dda", + "size": 610, + "platform": { + "architecture": "amd64", + "os": "linux" + }, + "annotations": { + "org.opencontainers.image.ref.name": "busybox:1.35.0-uclibc", + "io.containerd.image.name": "busybox:1.35.0-uclibc" + } + } + ] +} diff --git a/latest-1/uclibc/amd64/oci-layout b/latest-1/uclibc/amd64/oci-layout new file mode 100644 index 00000000..d5e10fd6 --- /dev/null +++ b/latest-1/uclibc/amd64/oci-layout @@ -0,0 +1 @@ +{"imageLayoutVersion":"1.0.0"} diff --git a/latest/glibc/Dockerfile b/latest/glibc/Dockerfile index 4c1acc7d..eb1261de 100644 --- a/latest/glibc/Dockerfile +++ b/latest/glibc/Dockerfile @@ -1,3 +1,5 @@ +# this isn't used for the official published images anymore, but is included for backwards compatibility +# see https://github.com/docker-library/bashbrew/issues/51 FROM scratch -ADD busybox.tar.xz / +ADD busybox.tar.gz / CMD ["sh"] diff --git a/latest/glibc/amd64/blobs/sha256/4be429a5fbb2e71ae7958bfa558bc637cf3a61baf40a708cb8fff532b39e52d0 b/latest/glibc/amd64/blobs/sha256/4be429a5fbb2e71ae7958bfa558bc637cf3a61baf40a708cb8fff532b39e52d0 new file mode 120000 index 00000000..9530c85b --- /dev/null +++ b/latest/glibc/amd64/blobs/sha256/4be429a5fbb2e71ae7958bfa558bc637cf3a61baf40a708cb8fff532b39e52d0 @@ -0,0 +1 @@ +../../image-manifest.json \ No newline at end of file diff --git a/latest/glibc/amd64/blobs/sha256/7b2699543f22d5b8dc8d66a5873eb246767bca37232dee1e7a3b8c9956bceb0c b/latest/glibc/amd64/blobs/sha256/7b2699543f22d5b8dc8d66a5873eb246767bca37232dee1e7a3b8c9956bceb0c new file mode 120000 index 00000000..980db356 --- /dev/null +++ b/latest/glibc/amd64/blobs/sha256/7b2699543f22d5b8dc8d66a5873eb246767bca37232dee1e7a3b8c9956bceb0c @@ -0,0 +1 @@ +../../rootfs.tar.gz \ No newline at end of file diff --git a/latest/glibc/amd64/blobs/sha256/ba5dc23f65d4cc4a4535bce55cf9e63b068eb02946e3422d3587e8ce803b6aab b/latest/glibc/amd64/blobs/sha256/ba5dc23f65d4cc4a4535bce55cf9e63b068eb02946e3422d3587e8ce803b6aab new file mode 120000 index 00000000..c8bac38c --- /dev/null +++ b/latest/glibc/amd64/blobs/sha256/ba5dc23f65d4cc4a4535bce55cf9e63b068eb02946e3422d3587e8ce803b6aab @@ -0,0 +1 @@ +../../image-config.json \ No newline at end of file diff --git a/latest/glibc/amd64/image-config.json b/latest/glibc/amd64/image-config.json new file mode 100644 index 00000000..2a022c04 --- /dev/null +++ b/latest/glibc/amd64/image-config.json @@ -0,0 +1,22 @@ +{ + "config": { + "Cmd": [ + "sh" + ] + }, + "created": "2023-05-18T22:34:17Z", + "history": [ + { + "created": "2023-05-18T22:34:17Z", + "created_by": "BusyBox 1.36.1 (glibc), Debian 12" + } + ], + "rootfs": { + "type": "layers", + "diff_ids": [ + "sha256:95c4a60383f7b6eb6f7b8e153a07cd6e896de0476763bef39d0f6cf3400624bd" + ] + }, + "architecture": "amd64", + "os": "linux" +} diff --git a/latest/glibc/amd64/image-manifest.json b/latest/glibc/amd64/image-manifest.json new file mode 100644 index 00000000..daf43039 --- /dev/null +++ b/latest/glibc/amd64/image-manifest.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:ba5dc23f65d4cc4a4535bce55cf9e63b068eb02946e3422d3587e8ce803b6aab", + "size": 372 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:7b2699543f22d5b8dc8d66a5873eb246767bca37232dee1e7a3b8c9956bceb0c", + "size": 2152262 + } + ], + "annotations": { + "org.opencontainers.image.url": "https://github.com/docker-library/busybox", + "org.opencontainers.image.version": "1.36.1-glibc" + } +} diff --git a/latest/glibc/amd64/index.json b/latest/glibc/amd64/index.json new file mode 100644 index 00000000..b5e2e51d --- /dev/null +++ b/latest/glibc/amd64/index.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.index.v1+json", + "manifests": [ + { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "digest": "sha256:4be429a5fbb2e71ae7958bfa558bc637cf3a61baf40a708cb8fff532b39e52d0", + "size": 610, + "platform": { + "architecture": "amd64", + "os": "linux" + }, + "annotations": { + "org.opencontainers.image.ref.name": "busybox:1.36.1-glibc", + "io.containerd.image.name": "busybox:1.36.1-glibc" + } + } + ] +} diff --git a/latest/glibc/amd64/oci-layout b/latest/glibc/amd64/oci-layout new file mode 100644 index 00000000..d5e10fd6 --- /dev/null +++ b/latest/glibc/amd64/oci-layout @@ -0,0 +1 @@ +{"imageLayoutVersion":"1.0.0"} diff --git a/latest/musl/Dockerfile b/latest/musl/Dockerfile index 4c1acc7d..eb1261de 100644 --- a/latest/musl/Dockerfile +++ b/latest/musl/Dockerfile @@ -1,3 +1,5 @@ +# this isn't used for the official published images anymore, but is included for backwards compatibility +# see https://github.com/docker-library/bashbrew/issues/51 FROM scratch -ADD busybox.tar.xz / +ADD busybox.tar.gz / CMD ["sh"] diff --git a/latest/musl/Dockerfile.builder b/latest/musl/Dockerfile.builder index fe395ade..2fdc9abd 100644 --- a/latest/musl/Dockerfile.builder +++ b/latest/musl/Dockerfile.builder @@ -116,11 +116,12 @@ RUN set -eux; \ ln -vL busybox rootfs/bin/; \ \ # copy simplified getconf port from Alpine - aportsVersion="v$(cat /etc/alpine-release)"; \ +# https://github.com/alpinelinux/aports/commits/HEAD/main/musl/getconf.c curl -fsSL \ - "https://github.com/alpinelinux/aports/raw/$aportsVersion/main/musl/getconf.c" \ + "https://github.com/alpinelinux/aports/raw/48b16204aeeda5bc1f87e49c6b8e23d9abb07c73/main/musl/getconf.c" \ -o /usr/src/getconf.c \ ; \ + echo 'd87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c */usr/src/getconf.c' | sha256sum -c -; \ gcc -o rootfs/bin/getconf -static -Os /usr/src/getconf.c; \ chroot rootfs /bin/getconf _NPROCESSORS_ONLN; \ \ diff --git a/latest/musl/amd64/blobs/sha256/6e5e0f90c009d12db9478afe5656920e7bdd548e9fd8f50eab2be694102ae318 b/latest/musl/amd64/blobs/sha256/6e5e0f90c009d12db9478afe5656920e7bdd548e9fd8f50eab2be694102ae318 new file mode 120000 index 00000000..c8bac38c --- /dev/null +++ b/latest/musl/amd64/blobs/sha256/6e5e0f90c009d12db9478afe5656920e7bdd548e9fd8f50eab2be694102ae318 @@ -0,0 +1 @@ +../../image-config.json \ No newline at end of file diff --git a/latest/musl/amd64/blobs/sha256/b9d056b83bb6446fee29e89a7fcf10203c562c1f59586a6e2f39c903597bda34 b/latest/musl/amd64/blobs/sha256/b9d056b83bb6446fee29e89a7fcf10203c562c1f59586a6e2f39c903597bda34 new file mode 120000 index 00000000..9530c85b --- /dev/null +++ b/latest/musl/amd64/blobs/sha256/b9d056b83bb6446fee29e89a7fcf10203c562c1f59586a6e2f39c903597bda34 @@ -0,0 +1 @@ +../../image-manifest.json \ No newline at end of file diff --git a/latest/musl/amd64/blobs/sha256/d6e6e2f0bb218b28aaad3f646fd30a36549d61bfbbdd7ad5d1d75b9d9e671297 b/latest/musl/amd64/blobs/sha256/d6e6e2f0bb218b28aaad3f646fd30a36549d61bfbbdd7ad5d1d75b9d9e671297 new file mode 120000 index 00000000..980db356 --- /dev/null +++ b/latest/musl/amd64/blobs/sha256/d6e6e2f0bb218b28aaad3f646fd30a36549d61bfbbdd7ad5d1d75b9d9e671297 @@ -0,0 +1 @@ +../../rootfs.tar.gz \ No newline at end of file diff --git a/latest/musl/amd64/image-config.json b/latest/musl/amd64/image-config.json new file mode 100644 index 00000000..12387f84 --- /dev/null +++ b/latest/musl/amd64/image-config.json @@ -0,0 +1,22 @@ +{ + "config": { + "Cmd": [ + "sh" + ] + }, + "created": "2023-05-18T22:34:17Z", + "history": [ + { + "created": "2023-05-18T22:34:17Z", + "created_by": "BusyBox 1.36.1 (musl), Alpine 3.19.1" + } + ], + "rootfs": { + "type": "layers", + "diff_ids": [ + "sha256:994bf8f4adc78c5c1e4a6b5e3b59ad57902b301e0e79255a3e95ea4b213a76bd" + ] + }, + "architecture": "amd64", + "os": "linux" +} diff --git a/latest/musl/amd64/image-manifest.json b/latest/musl/amd64/image-manifest.json new file mode 100644 index 00000000..d0ca8549 --- /dev/null +++ b/latest/musl/amd64/image-manifest.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:6e5e0f90c009d12db9478afe5656920e7bdd548e9fd8f50eab2be694102ae318", + "size": 375 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:d6e6e2f0bb218b28aaad3f646fd30a36549d61bfbbdd7ad5d1d75b9d9e671297", + "size": 852587 + } + ], + "annotations": { + "org.opencontainers.image.url": "https://github.com/docker-library/busybox", + "org.opencontainers.image.version": "1.36.1-musl" + } +} diff --git a/latest/musl/amd64/index.json b/latest/musl/amd64/index.json new file mode 100644 index 00000000..ac647649 --- /dev/null +++ b/latest/musl/amd64/index.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.index.v1+json", + "manifests": [ + { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "digest": "sha256:b9d056b83bb6446fee29e89a7fcf10203c562c1f59586a6e2f39c903597bda34", + "size": 608, + "platform": { + "architecture": "amd64", + "os": "linux" + }, + "annotations": { + "org.opencontainers.image.ref.name": "busybox:1.36.1-musl", + "io.containerd.image.name": "busybox:1.36.1-musl" + } + } + ] +} diff --git a/latest/musl/amd64/oci-layout b/latest/musl/amd64/oci-layout new file mode 100644 index 00000000..d5e10fd6 --- /dev/null +++ b/latest/musl/amd64/oci-layout @@ -0,0 +1 @@ +{"imageLayoutVersion":"1.0.0"} diff --git a/latest/uclibc/Dockerfile b/latest/uclibc/Dockerfile index 4c1acc7d..eb1261de 100644 --- a/latest/uclibc/Dockerfile +++ b/latest/uclibc/Dockerfile @@ -1,3 +1,5 @@ +# this isn't used for the official published images anymore, but is included for backwards compatibility +# see https://github.com/docker-library/bashbrew/issues/51 FROM scratch -ADD busybox.tar.xz / +ADD busybox.tar.gz / CMD ["sh"] diff --git a/latest/uclibc/amd64/blobs/sha256/23c25518807a447b99381ac33548b6a813ce904b613f11f5e19e1ea70e9c49e8 b/latest/uclibc/amd64/blobs/sha256/23c25518807a447b99381ac33548b6a813ce904b613f11f5e19e1ea70e9c49e8 new file mode 120000 index 00000000..c8bac38c --- /dev/null +++ b/latest/uclibc/amd64/blobs/sha256/23c25518807a447b99381ac33548b6a813ce904b613f11f5e19e1ea70e9c49e8 @@ -0,0 +1 @@ +../../image-config.json \ No newline at end of file diff --git a/latest/uclibc/amd64/blobs/sha256/478851d8396007d974a545c934638e208c2e83f20c413323d373ff87f2a4bce0 b/latest/uclibc/amd64/blobs/sha256/478851d8396007d974a545c934638e208c2e83f20c413323d373ff87f2a4bce0 new file mode 120000 index 00000000..9530c85b --- /dev/null +++ b/latest/uclibc/amd64/blobs/sha256/478851d8396007d974a545c934638e208c2e83f20c413323d373ff87f2a4bce0 @@ -0,0 +1 @@ +../../image-manifest.json \ No newline at end of file diff --git a/latest/uclibc/amd64/blobs/sha256/cd82127e91e4b4656e681824cb3687b64060f91d9b44a695055a3475ac0dcd89 b/latest/uclibc/amd64/blobs/sha256/cd82127e91e4b4656e681824cb3687b64060f91d9b44a695055a3475ac0dcd89 new file mode 120000 index 00000000..980db356 --- /dev/null +++ b/latest/uclibc/amd64/blobs/sha256/cd82127e91e4b4656e681824cb3687b64060f91d9b44a695055a3475ac0dcd89 @@ -0,0 +1 @@ +../../rootfs.tar.gz \ No newline at end of file diff --git a/latest/uclibc/amd64/image-config.json b/latest/uclibc/amd64/image-config.json new file mode 100644 index 00000000..01a1075c --- /dev/null +++ b/latest/uclibc/amd64/image-config.json @@ -0,0 +1,22 @@ +{ + "config": { + "Cmd": [ + "sh" + ] + }, + "created": "2023-05-18T22:34:17Z", + "history": [ + { + "created": "2023-05-18T22:34:17Z", + "created_by": "BusyBox 1.36.1 (uclibc), Buildroot 2023.11.1, Debian 12" + } + ], + "rootfs": { + "type": "layers", + "diff_ids": [ + "sha256:70d875e518ac9d2a6cda536a5422ba616fafcb661d71888ba29e5a031a248a3e" + ] + }, + "architecture": "amd64", + "os": "linux" +} diff --git a/latest/uclibc/amd64/image-manifest.json b/latest/uclibc/amd64/image-manifest.json new file mode 100644 index 00000000..98d4bae9 --- /dev/null +++ b/latest/uclibc/amd64/image-manifest.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:23c25518807a447b99381ac33548b6a813ce904b613f11f5e19e1ea70e9c49e8", + "size": 394 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:cd82127e91e4b4656e681824cb3687b64060f91d9b44a695055a3475ac0dcd89", + "size": 757887 + } + ], + "annotations": { + "org.opencontainers.image.url": "https://github.com/docker-library/busybox", + "org.opencontainers.image.version": "1.36.1-uclibc" + } +} diff --git a/latest/uclibc/amd64/index.json b/latest/uclibc/amd64/index.json new file mode 100644 index 00000000..90a625a3 --- /dev/null +++ b/latest/uclibc/amd64/index.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.index.v1+json", + "manifests": [ + { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "digest": "sha256:478851d8396007d974a545c934638e208c2e83f20c413323d373ff87f2a4bce0", + "size": 610, + "platform": { + "architecture": "amd64", + "os": "linux" + }, + "annotations": { + "org.opencontainers.image.ref.name": "busybox:1.36.1-uclibc", + "io.containerd.image.name": "busybox:1.36.1-uclibc" + } + } + ] +} diff --git a/latest/uclibc/amd64/oci-layout b/latest/uclibc/amd64/oci-layout new file mode 100644 index 00000000..d5e10fd6 --- /dev/null +++ b/latest/uclibc/amd64/oci-layout @@ -0,0 +1 @@ +{"imageLayoutVersion":"1.0.0"}