Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit d5292b8

Browse files
author
Mathieu Velten
authored
Fix Docker build when Rust .so has been build locally first (#13811)
Signed-off-by: Mathieu Velten <[email protected]>
1 parent 642c4b2 commit d5292b8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
!build_rust.py
1212

1313
rust/target
14+
synapse/*.so
1415

1516
**/__pycache__

changelog.d/13811.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix Docker build when Rust .so has been build locally first.

docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ ARG PYTHON_VERSION=3.9
3131
###
3232
### Stage 0: generate requirements.txt
3333
###
34-
FROM docker.io/python:${PYTHON_VERSION}-slim as requirements
34+
# We hardcode the use of Debian bullseye here because this could change upstream
35+
# and other Dockerfiles used for testing are expecting bullseye.
36+
FROM docker.io/python:${PYTHON_VERSION}-slim-bullseye as requirements
3537

3638
# RUN --mount is specific to buildkit and is documented at
3739
# https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#build-mounts-run---mount.
@@ -76,7 +78,7 @@ RUN if [ -z "$TEST_ONLY_IGNORE_POETRY_LOCKFILE" ]; then \
7678
###
7779
### Stage 1: builder
7880
###
79-
FROM docker.io/python:${PYTHON_VERSION}-slim as builder
81+
FROM docker.io/python:${PYTHON_VERSION}-slim-bullseye as builder
8082

8183
# install the OS build deps
8284
RUN \
@@ -137,7 +139,7 @@ RUN if [ -z "$TEST_ONLY_IGNORE_POETRY_LOCKFILE" ]; then \
137139
### Stage 2: runtime
138140
###
139141

140-
FROM docker.io/python:${PYTHON_VERSION}-slim
142+
FROM docker.io/python:${PYTHON_VERSION}-slim-bullseye
141143

142144
LABEL org.opencontainers.image.url='https://matrix.org/docs/projects/server/synapse'
143145
LABEL org.opencontainers.image.documentation='https://github.com/matrix-org/synapse/blob/master/docker/README.md'

0 commit comments

Comments
 (0)