Skip to content
Open
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
10 changes: 2 additions & 8 deletions build/gather-node-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ mkdir -p /staging-node/var/lib/dpkg/status.d

DEPS=(
/etc/netconfig
/etc/mke2fs.conf /sbin/{fsck,mkfs,mount,umount}.{ext{2,3,4},xfs,nfs}
/etc/mke2fs.conf /usr/sbin/{fsck,mkfs,mount,umount}.{ext{2,3,4},xfs,nfs}
/usr/bin/{mount,umount,lspci,lsof,chmod,grep,tail,partx}
/usr/sbin/{fsck,mkfs,sfdisk,losetup}
/sbin/resize2fs
/usr/sbin/resize2fs
/usr/sbin/xfs_growfs
)

Expand All @@ -31,12 +31,6 @@ gather_dep() {

# find the package that contains the source
pkg=${FILE_PACKAGES[$source]}
if [ -z "$pkg" ] && [[ "$source" = /usr/* ]]; then
# retry without /usr prefix
# use source path matching dpkg for SBOM to work, because /lib is not linked to /usr/lib in distroless
source="${source#/usr}"
pkg=${FILE_PACKAGES[$source]}
fi
if [ -z "$pkg" ]; then
echo "failed to find package for $source"
return 1
Expand Down
14 changes: 9 additions & 5 deletions build/multi/Dockerfile.multi
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ RUN --mount=type=bind,target=. \
-o /out/plugin.csi.alibabacloud.com && \
go build -trimpath -o /out/csiplugin-connector ./build/lib/csiplugin-connector.go

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

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

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

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

FROM --platform=$BUILDPLATFORM registry-cn-hangzhou.ack.aliyuncs.com/dev/debian:bookworm-20251020-slim as build-0
FROM --platform=$BUILDPLATFORM registry-cn-hangzhou.ack.aliyuncs.com/dev/debian:trixie-20251103-slim as build-0
ARG BUILDARCH
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-$BUILDARCH \
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=apt-lib-$BUILDARCH \
rm -f /etc/apt/apt.conf.d/docker-clean && \
echo 'Acquire::Check-Valid-Until false;' > /etc/apt/apt.conf.d/snapshot && \
sed -i '/^URIs:/d; s|^# \(http://snapshot.debian.org/\)|URIs: \1|' /etc/apt/sources.list.d/debian.sources && \
apt-get update && \
apt-get install -y tar xz-utils make diffutils
apt-get install -y tar xz-utils make diffutils gcc
# We need to install gcc in addition to gcc-${HOST} below.
# 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.
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083135

FROM build-0 as build-util-linux-amd64
ENV HOST=x86_64-linux-gnu
Expand All @@ -77,7 +80,8 @@ SOURCE_DATE_EPOCH=$(stat -c %Y /src.tar.xz)
export SOURCE_DATE_EPOCH
echo "util-linux released at $(date --date "@$SOURCE_DATE_EPOCH" --iso-8601=seconds)"
./configure --disable-all-programs --enable-blkid --enable-libblkid --prefix=/usr/local \
--disable-nls --disable-bash-completion --disable-asciidoc --disable-dependency-tracking --disable-static --host=$HOST
--disable-nls --disable-bash-completion --disable-asciidoc --disable-dependency-tracking --disable-static --host=$HOST || \
{ RET=$?; echo "content of ./config.log:"; cat ./config.log; exit $RET; }
make -j
make install-strip DESTDIR=/out
cd /out/usr/local && rm -r include share lib/pkgconfig
Expand Down
84 changes: 42 additions & 42 deletions hack/base-image-deps.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
base-files 12.4+deb12u12
coreutils 9.1-1
e2fsprogs 1.47.0-2+b2
fdisk 2.38.1-5+deb12u3
grep 3.8-5
libblkid1 2.38.1-5+deb12u3
libc6 2.36-9+deb12u13
libcom-err2 1.47.0-2+b2
libext2fs2 1.47.0-2+b2
libfdisk1 2.38.1-5+deb12u3
libgssapi-krb5-2 1.20.1-2+deb12u4
libinih1 55-1
libk5crypto3 1.20.1-2+deb12u4
libkeyutils1 1.6.3-2
libkmod2 30+20221128-1
libkrb5-3 1.20.1-2+deb12u4
libkrb5support0 1.20.1-2+deb12u4
liblzma5 5.4.1-1
libmount1 2.38.1-5+deb12u3
libpci3 1:3.9.0-4
libpcre2-8-0 10.42-1
libreadline8 8.2-1.3
libselinux1 3.4-1+b6
libsmartcols1 2.38.1-5+deb12u3
libssl3 3.0.17-1~deb12u3
libtinfo6 6.4-4
libtirpc-common 1.3.3+ds-1
libtirpc3 1.3.3+ds-1
libudev1 252.39-1~deb12u1
liburcu8 0.13.2-1
libuuid1 2.38.1-5+deb12u3
libzstd1 1.5.4+dfsg2-5
lsof 4.95.0-1
media-types 10.0.0
mount 2.38.1-5+deb12u3
netbase 6.4
nfs-common 1:2.6.2-4+deb12u1
pciutils 1:3.9.0-4
tzdata 2025b-0+deb12u2
util-linux 2.38.1-5+deb12u3
xfsprogs 6.1.0-1
zlib1g 1:1.2.13.dfsg-1
base-files 13.8+deb13u1
coreutils 9.7-3
e2fsprogs 1.47.2-3+b3
fdisk 2.41-5
grep 3.11-4
libblkid1 2.41-5
libc6 2.41-12
libcap2 1:2.75-10+b1
libcom-err2 1.47.2-3+b3
libext2fs2t64 1.47.2-3+b3
libfdisk1 2.41-5
libgssapi-krb5-2 1.21.3-5
libinih1 59-1
libk5crypto3 1.21.3-5
libkeyutils1 1.6.3-6
libkmod2 34.2-2
libkrb5-3 1.21.3-5
libkrb5support0 1.21.3-5
libmount1 2.41-5
libpci3 1:3.13.0-2
libpcre2-8-0 10.46-1~deb13u1
libreadline8t64 8.2-6
libselinux1 3.8.1-1
libsmartcols1 2.41-5
libssl3t64 3.5.1-1+deb13u1
libtinfo6 6.5+20250216-2
libtirpc-common 1.3.6+ds-1
libtirpc3t64 1.3.6+ds-1
libudev1 257.8-1~deb13u2
liburcu8t64 0.15.2-2
libuuid1 2.41-5
libzstd1 1.5.7+dfsg-1
lsof 4.99.4+dfsg-2
media-types 13.0.0
mount 2.41-5
netbase 6.5
nfs-common 1:2.8.3-1
pciutils 1:3.13.0-2
tzdata 2025b-4+deb13u1
util-linux 2.41-5
xfsprogs 6.13.0-2+b1
zlib1g 1:1.3.dfsg+really1.3.1-1+b1
6 changes: 3 additions & 3 deletions hack/update-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ skopeo() {

DOCKERFILE=build/multi/Dockerfile.multi

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

if [ "$UPSTREAM" ]; then
DISTROLESS=gcr.io/distroless/base-debian12
DISTROLESS=gcr.io/distroless/base-debian13
DEBIAN=docker.io/debian
fi

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

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

sed -i "
Expand Down
1 change: 1 addition & 0 deletions pkg/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ func mkfsDefaultArgs(fstype, source string) (args []string) {
} else if fstype == "xfs" {
args = []string{
"-f",
"-i", "nrext64=0", // This requires kernel v5.19, so disable for now.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another reason to hold this. We will need to replace ASI dockerfile before merge. Old mkfs.xfs will not understand this flag.

source,
}
}
Expand Down