Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around Synapse Docker build failures by using a --cache-dir #1271

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Changes from all 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
8 changes: 7 additions & 1 deletion docker/synapse.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ RUN apt-get -qq update && apt-get -qq install -y \
apt-utils ${PYTHON_VERSION} ${PYTHON_VERSION}-dev ${PYTHON_VERSION}-venv \
python3-pip eatmydata redis-server

RUN ${PYTHON_VERSION} -m pip install -q --no-cache-dir poetry==1.1.12
RUN ${PYTHON_VERSION} -m pip install --cache-dir /pip-cache poetry==1.1.12 && \
rm -rf /pip-cache
# Instead of using `--no-cache-dir`, we specify a `--cache-dir` and delete it
# afterwards. This works around a bug where `msgpack` gets installed to
# `site-packages`, where Python can't find it, instead of `dist-packages`, when
# using `setuptools>=48.0.0` and the `--no-cache-dir` option.
# https://github.com/matrix-org/sytest/issues/1269

# As part of the Docker build, we attempt to pre-install Synapse's dependencies
# in the hope that it speeds up the real install of Synapse. To make this work,
Expand Down