1- # NOTE: Ensure builder's Rust version matches CI's in .circleci/config.yml
2- FROM docker.io/lukemathwalker/cargo-chef:0.1.67-rust-1.78-bullseye as chef
1+ # NOTE: Ensure builder's Rust version matches CI's in .circleci/config.yml # RUST_VER
2+ FROM docker.io/lukemathwalker/cargo-chef:0.1.67-rust-1.78-bookworm as chef
33WORKDIR /app
44
55FROM chef AS planner
1414 # Fetch and load the MySQL public key. We need to install libmysqlclient-dev to build syncstorage-rs
1515 # which wants the mariadb
1616 wget -qO- https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 > /etc/apt/trusted.gpg.d/mysql.asc && \
17- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-8.0" >> /etc/apt/sources.list && \
17+ echo "deb https://repo.mysql.com/apt/debian/ bookworm mysql-8.0" >> /etc/apt/sources.list && \
1818 apt-get -q update && \
1919 apt-get -q install -y --no-install-recommends libmysqlclient-dev cmake
2020
@@ -31,14 +31,14 @@ COPY --from=cacher $CARGO_HOME /app/$CARGO_HOME
3131RUN \
3232 # Fetch and load the MySQL public key
3333 wget -qO- https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 > /etc/apt/trusted.gpg.d/mysql.asc && \
34- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-8.0" >> /etc/apt/sources.list && \
34+ echo "deb https://repo.mysql.com/apt/debian/ bookworm mysql-8.0" >> /etc/apt/sources.list && \
3535 # mysql_pubkey.asc from:
3636 # https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html
3737 # related:
3838 # https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-repo-manual-setup
3939 apt-get -q update && \
40- apt-get -q install -y --no-install-recommends libmysqlclient-dev cmake golang-go python3-dev python3-pip python3-setuptools python3-wheel && \
41- pip3 install -r requirements.txt && \
40+ apt-get -q install -y --no-install-recommends libmysqlclient-dev cmake golang-go pkg-config python3-dev python3-pip python3-setuptools python3-wheel && \
41+ pip3 install --break-system-packages -r /app/ requirements.txt && \
4242 rm -rf /var/lib/apt/lists/*
4343
4444ENV PATH=$PATH:/root/.cargo/bin
4949 cargo install --path ./syncserver --no-default-features --features=$DATABASE_BACKEND,py_verifier --locked --root /app && \
5050 if [ "$DATABASE_BACKEND" = "spanner" ] ; then cargo install --path ./syncstorage-spanner --locked --root /app --bin purge_ttl ; fi
5151
52- FROM docker.io/library/debian:bullseye -slim
52+ FROM docker.io/library/debian:bookworm -slim
5353WORKDIR /app
5454COPY --from=builder /app/requirements.txt /app
5555# Due to a build error that occurs with the Python cryptography package, we
@@ -69,17 +69,17 @@ RUN \
6969 apt-get -q update && \
7070 # and ca-certificates needed for https://repo.mysql.com
7171 apt-get install -y gnupg ca-certificates wget && \
72+ echo "deb https://repo.mysql.com/apt/debian/ bookworm mysql-8.0" >> /etc/apt/sources.list && \
7273 # Fetch and load the MySQL public key
73- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-8.0" >> /etc/apt/sources.list && \
7474 wget -qO- https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 > /etc/apt/trusted.gpg.d/mysql.asc && \
7575 # update again now that we trust repo.mysql.com
7676 apt-get -q update && \
77- apt-get -q install -y build-essential libmysqlclient-dev libssl-dev libffi-dev libcurl4 python3-dev python3-pip python3-setuptools python3-wheel cargo curl jq && \
77+ apt-get -q install -y build-essential libmysqlclient-dev libssl-dev libffi-dev libcurl4 pkg-config python3-dev python3-pip python3-setuptools python3-wheel cargo curl jq && \
7878 # The python3-cryptography debian package installs version 2.6.1, but we
7979 # we want to use the version specified in requirements.txt. To do this,
8080 # we have to remove the python3-cryptography package here.
8181 apt-get -q remove -y python3-cryptography && \
82- pip3 install -r /app/requirements.txt && \
82+ pip3 install --break-system-packages - r /app/requirements.txt && \
8383 rm -rf /var/lib/apt/lists/*
8484
8585COPY --from=builder /app/bin /app/bin
@@ -92,8 +92,10 @@ COPY --from=builder /app/scripts/start_mock_fxa_server.sh /app/scripts/start_moc
9292COPY --from=builder /app/syncstorage-spanner/src/schema.ddl /app/schema.ddl
9393
9494RUN chmod +x /app/scripts/prepare-spanner.sh
95- RUN pip3 install -r /app/tools/integration_tests/requirements.txt
96- RUN pip3 install -r /app/tools/tokenserver/requirements.txt
95+ RUN \
96+ pip3 install --break-system-packages -r /app/tools/integration_tests/requirements.txt
97+ RUN \
98+ pip3 install --break-system-packages -r /app/tools/tokenserver/requirements.txt
9799
98100USER app:app
99101
0 commit comments