Skip to content

Commit 4a503f8

Browse files
authored
chore: revert back to bullseye (for now) (#1589)
this also downgrades Oracle's libmysqlclient-dev from 8.0.37-1debian11 to 8.0.39-1debian12 this is to test if the debian version and or the libmysqlclient-dev version are the cause of both db pool initialization failures as well as other seemingly mysterious likely network related issues seen in 0.17.x Issue SYNC-4363
1 parent 0996cb5 commit 4a503f8

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

Dockerfile

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
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
33
WORKDIR /app
44

55
FROM chef AS planner
@@ -14,7 +14,7 @@ RUN \
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/ bookworm mysql-8.0" >> /etc/apt/sources.list && \
17+
echo "deb https://repo.mysql.com/apt/debian/ bullseye 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
3131
RUN \
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/ bookworm mysql-8.0" >> /etc/apt/sources.list && \
34+
echo "deb https://repo.mysql.com/apt/debian/ bullseye 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 pkg-config python3-dev python3-pip python3-setuptools python3-wheel && \
41-
pip3 install --break-system-packages -r /app/requirements.txt && \
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 && \
4242
rm -rf /var/lib/apt/lists/*
4343

4444
ENV PATH=$PATH:/root/.cargo/bin
@@ -49,7 +49,7 @@ RUN \
4949
cargo install --path ./syncserver --no-default-features --features=syncstorage-db/$DATABASE_BACKEND --features=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:bookworm-slim
52+
FROM docker.io/library/debian:bullseye-slim
5353
WORKDIR /app
5454
COPY --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 && \
7372
# 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 pkg-config 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 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 --break-system-packages -r /app/requirements.txt && \
82+
pip3 install -r /app/requirements.txt && \
8383
rm -rf /var/lib/apt/lists/*
8484

8585
COPY --from=builder /app/bin /app/bin
@@ -92,10 +92,8 @@ COPY --from=builder /app/scripts/start_mock_fxa_server.sh /app/scripts/start_moc
9292
COPY --from=builder /app/syncstorage-spanner/src/schema.ddl /app/schema.ddl
9393

9494
RUN chmod +x /app/scripts/prepare-spanner.sh
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
95+
RUN pip3 install -r /app/tools/integration_tests/requirements.txt
96+
RUN pip3 install -r /app/tools/tokenserver/requirements.txt
9997

10098
USER app:app
10199

0 commit comments

Comments
 (0)