@@ -51,7 +51,12 @@ RUN apt-get -y -qq -o Dpkg::Use-Pty=0 update
5151RUN apt-get -y -qq -o Dpkg::Use-Pty=0 -y upgrade
5252
5353RUN apt-get -y -qq -o Dpkg::Use-Pty=0 install --no-install-recommends bash # for the staging scripts and ldd
54+ # Newer Debian uses symlinks but the stage_binaries tool is kind of dumb.
5455RUN mkdir -p {ARG_STAGING}
56+ RUN mkdir -p {ARG_STAGING}/usr/bin && ln -s usr/bin {ARG_STAGING}/bin
57+ RUN mkdir -p {ARG_STAGING}/usr/sbin && ln -s usr/sbin {ARG_STAGING}/sbin
58+ RUN mkdir -p {ARG_STAGING}/usr/lib && ln -s usr/lib {ARG_STAGING}/lib
59+ RUN mkdir -p {ARG_STAGING}/usr/lib64 && ln -s usr/lib64 {ARG_STAGING}/lib64
5560COPY stage_binaries.sh /
5661RUN /stage_binaries.sh -o {ARG_STAGING} \
5762 -p base-files \
@@ -70,14 +75,14 @@ RUN /stage_binaries.sh -o {ARG_STAGING} \
7075 -f /etc/os-release \
7176 -f /etc/passwd \
7277 -f /tmp
73- RUN ln -s /bin/ bash {ARG_STAGING}/bin/sh # Not sure why this is not set up automatically
78+ RUN ln -s bash {ARG_STAGING}/bin/sh # Not sure why this is not set up automatically
7479
7580FROM scratch AS intermediate
7681
7782# Docker doesn't do vars in COPY, so we can't use a regular ARG.
7883COPY --from=base {ARG_STAGING} /
7984
80- # This list is not generic - it is specific to git-sync on debian bookworm .
85+ # This list is not generic - it is specific to git-sync on debian trixie .
8186RUN rm -rf \
8287 /usr/share/base-files \
8388 /usr/share/doc \
@@ -103,7 +108,8 @@ RUN rm -rf \
103108 /usr/lib/openssh/ssh-keysign \
104109 /usr/lib/openssh/ssh-pkcs11-helper \
105110 /usr/lib/openssh/ssh-sk-helper \
106- /usr/share/gitweb
111+ /usr/share/gitweb \
112+ /usr/share/locale
107113
108114# Add the default UID to /etc/passwd so SSH is satisfied.
109115RUN echo "git-sync:x:65533:65533::/tmp:/sbin/nologin" >> /etc/passwd
0 commit comments