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

Fix Docker build when Rust .so has been build locally first #13811

Merged
merged 3 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
!build_rust.py

rust/target
synapse/*.so
MatMaul marked this conversation as resolved.
Show resolved Hide resolved

**/__pycache__
1 change: 1 addition & 0 deletions changelog.d/13811.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix Docker build when Rust .so has been build locally first.
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ARG PYTHON_VERSION=3.9
###
### Stage 0: generate requirements.txt
###
FROM docker.io/python:${PYTHON_VERSION}-slim as requirements
FROM docker.io/python:${PYTHON_VERSION}-slim-bullseye as requirements
MatMaul marked this conversation as resolved.
Show resolved Hide resolved

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

# install the OS build deps
RUN \
Expand Down Expand Up @@ -137,7 +137,7 @@ RUN if [ -z "$TEST_ONLY_IGNORE_POETRY_LOCKFILE" ]; then \
### Stage 2: runtime
###

FROM docker.io/python:${PYTHON_VERSION}-slim
FROM docker.io/python:${PYTHON_VERSION}-slim-bullseye

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