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

Commit 909fdef

Browse files
committed
Install deps using pip if we're skipping the lockfile
1 parent ffdffae commit 909fdef

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docker/Dockerfile

+10-1
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,17 @@ COPY synapse /synapse/synapse/
119119
# ... and what we need to `pip install`.
120120
COPY pyproject.toml README.rst /synapse/
121121

122+
# Repeat of earlier build argument declaration, as this is a new build stage.
123+
ARG TEST_ONLY_IGNORE_POETRY_LOCKFILE
124+
122125
# Install the synapse package itself.
123-
RUN pip install --prefix="/install" --no-deps --no-warn-script-location /synapse[all]
126+
# Unless we haven't populated requirements.txt, we don't install any dependencies
127+
# as we should already have those from the previous `pip install` step.
128+
RUN if [ -z "$TEST_ONLY_IGNORE_POETRY_LOCKFILE" ]; then \
129+
pip install --prefix="/install" --no-deps --no-warn-script-location /synapse[all]; \
130+
else \
131+
pip install --prefix="/install" --no-warn-script-location /synapse[all]; \
132+
fi
124133

125134
###
126135
### Stage 2: runtime

0 commit comments

Comments
 (0)