11# Build binary
2+ ARG DEBIAN_TESTING_SNAPSHOT=20260404T140000Z
3+
24FROM rust:1-bookworm AS workspace
35
46ARG SCCACHE_GCS_BUCKET
@@ -37,6 +39,8 @@ WORKDIR /build
3739
3840FROM workspace AS tester
3941
42+ ARG DEBIAN_TESTING_SNAPSHOT
43+
4044SHELL ["/bin/bash", "--login", "-c"]
4145
4246RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
@@ -53,15 +57,14 @@ RUN wget https://storage.googleapis.com/payy-public-fixtures/bb/v3.0.0-manual.20
5357 mv bb /usr/local/bin/bb && \
5458 rm barretenberg.tar.gz
5559
56- # bb requires a recent glibcxx version
57- # Enable backports and pull libstdc++ 13.x (exports GLIBCXX_3.4.31)
58- # also installs jq, some bb commands require jq
59- RUN echo 'deb http://deb.debian.org/debian testing main' \
60- > /etc/apt/sources.list.d/testing.list && \
61- echo 'APT::Default-Release "stable";' \
62- > /etc/apt/apt.conf.d/99defaultrelease && \
63- apt-get update && \
64- # pull only the two runtime libs from testing
60+ # bb requires a recent glibcxx version.
61+ # Freeze Debian testing to a known-good snapshot so upstream testing changes
62+ # do not break image builds.
63+ RUN echo "deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/${DEBIAN_TESTING_SNAPSHOT} testing main" \
64+ > /etc/apt/sources.list.d/testing.list && \
65+ echo 'APT::Default-Release "stable";' \
66+ > /etc/apt/apt.conf.d/99defaultrelease && \
67+ apt-get update && \
6568 DEBIAN_FRONTEND=noninteractive \
6669 apt-get install -y -t testing libc6 libstdc++6 jq
6770
@@ -140,6 +143,8 @@ RUN cp /build/target/$([ "$RELEASE" = "1" ] && echo "release" || echo "debug")/b
140143# Runtime stage dedicated to barretenberg-api-server
141144FROM debian:bookworm-slim as runtime
142145
146+ ARG DEBIAN_TESTING_SNAPSHOT
147+
143148ENV ROOT_DIR /polybase
144149WORKDIR $ROOT_DIR
145150
@@ -158,14 +163,12 @@ RUN wget https://storage.googleapis.com/payy-public-fixtures/bb/v3.0.0-manual.20
158163 mv bb /usr/local/bin/bb && \
159164 rm barretenberg.tar.gz
160165
161- # Enable backports and pull libstdc++ 13.x (exports GLIBCXX_3.4.31)
162- # also installs jq, some bb commands require jq
163- RUN echo 'deb http://deb.debian.org/debian testing main' \
164- > /etc/apt/sources.list.d/testing.list && \
165- echo 'APT::Default-Release "stable";' \
166- > /etc/apt/apt.conf.d/99defaultrelease && \
167- apt-get update && \
168- # pull only the two runtime libs from testing
166+ # Freeze Debian testing to the same snapshot used in the tester stage.
167+ RUN echo "deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/${DEBIAN_TESTING_SNAPSHOT} testing main" \
168+ > /etc/apt/sources.list.d/testing.list && \
169+ echo 'APT::Default-Release "stable";' \
170+ > /etc/apt/apt.conf.d/99defaultrelease && \
171+ apt-get update && \
169172 DEBIAN_FRONTEND=noninteractive \
170173 apt-get install -y -t testing libc6 libstdc++6 jq
171174
0 commit comments