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

Commit

Permalink
Cache Rust build cache when building docker images (#14130)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston authored Oct 17, 2022
1 parent c101fc6 commit 6fee2f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/14129.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix pinning Rust dependencies in docker images.

This comment has been minimized.

Copy link
@DMRobertson

DMRobertson Oct 17, 2022

Contributor

I think this snuck in from the release branch?

1 change: 1 addition & 0 deletions changelog.d/14130.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cache Rust build cache when building docker images.
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ ARG TEST_ONLY_IGNORE_POETRY_LOCKFILE
# Install the synapse package itself.
# If we have populated requirements.txt, we don't install any dependencies
# as we should already have those from the previous `pip install` step.
RUN if [ -z "$TEST_ONLY_IGNORE_POETRY_LOCKFILE" ]; then \
RUN --mount=type=cache,target=/synapse/target,sharing=locked \
--mount=type=cache,target=${CARGO_HOME}/registry,sharing=locked \
if [ -z "$TEST_ONLY_IGNORE_POETRY_LOCKFILE" ]; then \
pip install --prefix="/install" --no-deps --no-warn-script-location /synapse[all]; \
else \
pip install --prefix="/install" --no-warn-script-location /synapse[all]; \
Expand Down

0 comments on commit 6fee2f4

Please sign in to comment.