Skip to content

Commit c44dea3

Browse files
committed
upgrade base image to debian 13
Now all binaries are under /usr, we can remove the logic to search both.
1 parent 298a44f commit c44dea3

File tree

4 files changed

+56
-58
lines changed

4 files changed

+56
-58
lines changed

build/gather-node-deps.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ mkdir -p /staging-node/var/lib/dpkg/status.d
66

77
DEPS=(
88
/etc/netconfig
9-
/etc/mke2fs.conf /sbin/{fsck,mkfs,mount,umount}.{ext{2,3,4},xfs,nfs}
9+
/etc/mke2fs.conf /usr/sbin/{fsck,mkfs,mount,umount}.{ext{2,3,4},xfs,nfs}
1010
/usr/bin/{mount,umount,lspci,lsof,chmod,grep,tail,partx}
1111
/usr/sbin/{fsck,mkfs,sfdisk,losetup}
12-
/sbin/resize2fs
12+
/usr/sbin/resize2fs
1313
/usr/sbin/xfs_growfs
1414
)
1515

@@ -31,12 +31,6 @@ gather_dep() {
3131

3232
# find the package that contains the source
3333
pkg=${FILE_PACKAGES[$source]}
34-
if [ -z "$pkg" ] && [[ "$source" = /usr/* ]]; then
35-
# retry without /usr prefix
36-
# use source path matching dpkg for SBOM to work, because /lib is not linked to /usr/lib in distroless
37-
source="${source#/usr}"
38-
pkg=${FILE_PACKAGES[$source]}
39-
fi
4034
if [ -z "$pkg" ]; then
4135
echo "failed to find package for $source"
4236
return 1

build/multi/Dockerfile.multi

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ RUN --mount=type=bind,target=. \
1515
-o /out/plugin.csi.alibabacloud.com && \
1616
go build -trimpath -o /out/csiplugin-connector ./build/lib/csiplugin-connector.go
1717

18-
FROM registry-cn-hangzhou.ack.aliyuncs.com/dev/ack-base/distroless/base-debian12:latest@sha256:9e9b50d2048db3741f86a48d939b4e4cc775f5889b3496439343301ff54cdba8 as distroless-base
18+
FROM registry-cn-hangzhou.ack.aliyuncs.com/dev/ack-base/distroless/base-debian13:latest@sha256:894e78799ebace28d56fc226a05d76a601685e1382421299eed8b7a95b90fa9e as distroless-base
1919
LABEL maintainers="Alibaba Cloud Authors" description="Alibaba Cloud CSI Plugin"
2020
LABEL defaultOssfsImageTag="v1.91.8.ack.3-b0e4403" defaultOssfs2ImageTag="v2.0.4.ack.1-5073ed2"
2121

2222
FROM distroless-base as csi-base
2323
COPY --link --from=build /out/plugin.csi.alibabacloud.com /usr/bin/plugin.csi.alibabacloud.com
2424
ENTRYPOINT ["/usr/bin/plugin.csi.alibabacloud.com"]
2525

26-
FROM registry-cn-hangzhou.ack.aliyuncs.com/dev/debian:bookworm-20251020-slim as debian
26+
FROM registry-cn-hangzhou.ack.aliyuncs.com/dev/debian:trixie-20251103-slim as debian
2727

2828
ARG TARGETARCH
2929
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-$TARGETARCH \
@@ -42,15 +42,18 @@ RUN --mount=type=bind,from=distroless-base,target=/base \
4242
FROM distroless-base as dep-list
4343
COPY --link --from=debian /staging-node /
4444

45-
FROM --platform=$BUILDPLATFORM registry-cn-hangzhou.ack.aliyuncs.com/dev/debian:bookworm-20251020-slim as build-0
45+
FROM --platform=$BUILDPLATFORM registry-cn-hangzhou.ack.aliyuncs.com/dev/debian:trixie-20251103-slim as build-0
4646
ARG BUILDARCH
4747
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-$BUILDARCH \
4848
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=apt-lib-$BUILDARCH \
4949
rm -f /etc/apt/apt.conf.d/docker-clean && \
5050
echo 'Acquire::Check-Valid-Until false;' > /etc/apt/apt.conf.d/snapshot && \
5151
sed -i '/^URIs:/d; s|^# \(http://snapshot.debian.org/\)|URIs: \1|' /etc/apt/sources.list.d/debian.sources && \
5252
apt-get update && \
53-
apt-get install -y tar xz-utils make diffutils
53+
apt-get install -y tar xz-utils make diffutils gcc
54+
# We need to install gcc in addition to gcc-${HOST} below.
55+
# On e.g. amd64, gcc-x86-64-linux-gnu depends on "binutils-x86-64-linux-gnu", but it calls `as`, which is in "binutils" and not installed by default.
56+
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083135
5457

5558
FROM build-0 as build-util-linux-amd64
5659
ENV HOST=x86_64-linux-gnu
@@ -77,7 +80,8 @@ SOURCE_DATE_EPOCH=$(stat -c %Y /src.tar.xz)
7780
export SOURCE_DATE_EPOCH
7881
echo "util-linux released at $(date --date "@$SOURCE_DATE_EPOCH" --iso-8601=seconds)"
7982
./configure --disable-all-programs --enable-blkid --enable-libblkid --prefix=/usr/local \
80-
--disable-nls --disable-bash-completion --disable-asciidoc --disable-dependency-tracking --disable-static --host=$HOST
83+
--disable-nls --disable-bash-completion --disable-asciidoc --disable-dependency-tracking --disable-static --host=$HOST || \
84+
{ RET=$?; echo "content of ./config.log:"; cat ./config.log; exit $RET; }
8185
make -j
8286
make install-strip DESTDIR=/out
8387
cd /out/usr/local && rm -r include share lib/pkgconfig

hack/base-image-deps.txt

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
base-files 12.4+deb12u12
2-
coreutils 9.1-1
3-
e2fsprogs 1.47.0-2+b2
4-
fdisk 2.38.1-5+deb12u3
5-
grep 3.8-5
6-
libblkid1 2.38.1-5+deb12u3
7-
libc6 2.36-9+deb12u13
8-
libcom-err2 1.47.0-2+b2
9-
libext2fs2 1.47.0-2+b2
10-
libfdisk1 2.38.1-5+deb12u3
11-
libgssapi-krb5-2 1.20.1-2+deb12u4
12-
libinih1 55-1
13-
libk5crypto3 1.20.1-2+deb12u4
14-
libkeyutils1 1.6.3-2
15-
libkmod2 30+20221128-1
16-
libkrb5-3 1.20.1-2+deb12u4
17-
libkrb5support0 1.20.1-2+deb12u4
18-
liblzma5 5.4.1-1
19-
libmount1 2.38.1-5+deb12u3
20-
libpci3 1:3.9.0-4
21-
libpcre2-8-0 10.42-1
22-
libreadline8 8.2-1.3
23-
libselinux1 3.4-1+b6
24-
libsmartcols1 2.38.1-5+deb12u3
25-
libssl3 3.0.17-1~deb12u3
26-
libtinfo6 6.4-4
27-
libtirpc-common 1.3.3+ds-1
28-
libtirpc3 1.3.3+ds-1
29-
libudev1 252.39-1~deb12u1
30-
liburcu8 0.13.2-1
31-
libuuid1 2.38.1-5+deb12u3
32-
libzstd1 1.5.4+dfsg2-5
33-
lsof 4.95.0-1
34-
media-types 10.0.0
35-
mount 2.38.1-5+deb12u3
36-
netbase 6.4
37-
nfs-common 1:2.6.2-4+deb12u1
38-
pciutils 1:3.9.0-4
39-
tzdata 2025b-0+deb12u2
40-
util-linux 2.38.1-5+deb12u3
41-
xfsprogs 6.1.0-1
42-
zlib1g 1:1.2.13.dfsg-1
1+
base-files 13.8+deb13u1
2+
coreutils 9.7-3
3+
e2fsprogs 1.47.2-3+b3
4+
fdisk 2.41-5
5+
grep 3.11-4
6+
libblkid1 2.41-5
7+
libc6 2.41-12
8+
libcap2 1:2.75-10+b1
9+
libcom-err2 1.47.2-3+b3
10+
libext2fs2t64 1.47.2-3+b3
11+
libfdisk1 2.41-5
12+
libgssapi-krb5-2 1.21.3-5
13+
libinih1 59-1
14+
libk5crypto3 1.21.3-5
15+
libkeyutils1 1.6.3-6
16+
libkmod2 34.2-2
17+
libkrb5-3 1.21.3-5
18+
libkrb5support0 1.21.3-5
19+
libmount1 2.41-5
20+
libpci3 1:3.13.0-2
21+
libpcre2-8-0 10.46-1~deb13u1
22+
libreadline8t64 8.2-6
23+
libselinux1 3.8.1-1
24+
libsmartcols1 2.41-5
25+
libssl3t64 3.5.1-1+deb13u1
26+
libtinfo6 6.5+20250216-2
27+
libtirpc-common 1.3.6+ds-1
28+
libtirpc3t64 1.3.6+ds-1
29+
libudev1 257.8-1~deb13u2
30+
liburcu8t64 0.15.2-2
31+
libuuid1 2.41-5
32+
libzstd1 1.5.7+dfsg-1
33+
lsof 4.99.4+dfsg-2
34+
media-types 13.0.0
35+
mount 2.41-5
36+
netbase 6.5
37+
nfs-common 1:2.8.3-1
38+
pciutils 1:3.13.0-2
39+
tzdata 2025b-4+deb13u1
40+
util-linux 2.41-5
41+
xfsprogs 6.13.0-2+b1
42+
zlib1g 1:1.3.dfsg+really1.3.1-1+b1

hack/update-dockerfile.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ skopeo() {
88

99
DOCKERFILE=build/multi/Dockerfile.multi
1010

11-
DISTROLESS=registry-cn-hangzhou.ack.aliyuncs.com/dev/ack-base/distroless/base-debian12
11+
DISTROLESS=registry-cn-hangzhou.ack.aliyuncs.com/dev/ack-base/distroless/base-debian13
1212
DEBIAN=registry-cn-hangzhou.ack.aliyuncs.com/dev/debian
1313

1414
if [ "$UPSTREAM" ]; then
15-
DISTROLESS=gcr.io/distroless/base-debian12
15+
DISTROLESS=gcr.io/distroless/base-debian13
1616
DEBIAN=docker.io/debian
1717
fi
1818

1919
DISTROLESS_DIGEST=$(skopeo inspect docker://$DISTROLESS --format '{{.Digest}}')
2020
echo "The latest distroless digest is $DISTROLESS_DIGEST"
2121

22-
DEBIAN_TAG=$(skopeo list-tags docker://$DEBIAN | jq -r '.Tags|map(select(test("^bookworm-.+-slim$"))) | sort | last')
22+
DEBIAN_TAG=$(skopeo list-tags docker://$DEBIAN | jq -r '.Tags|map(select(test("^trixie-.+-slim$"))) | sort | last')
2323
echo "The latest debian tag is $DEBIAN_TAG"
2424

2525
sed -i "

0 commit comments

Comments
 (0)