You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -214,7 +214,7 @@ For example, you might have a Dockerfile that looks something like this:
214
214
FROM python
215
215
COPY pyproject.toml poetry.lock .
216
216
COPY src/ ./src
217
-
RUN pip install poetry && poetry install --without dev
217
+
RUN pip install poetry && poetry install --only main
218
218
```
219
219
220
220
As soon as *any* source file changes, the cache for the `RUN` layer will be invalidated, which forces all 3rd party dependencies (likely the slowest step out of these) to be installed again if you changed any files in `src/`.
@@ -229,9 +229,9 @@ This might look something like this:
229
229
```text
230
230
FROM python
231
231
COPY pyproject.toml poetry.lock .
232
-
RUN pip install poetry && poetry install --no-root --no-directory
232
+
RUN pip install poetry && poetry install --only main --no-root --no-directory
233
233
COPY src/ ./src
234
-
RUN poetry install --without dev
234
+
RUN poetry install --only main
235
235
```
236
236
237
237
The two key options we are using here are `--no-root` (skips installing the project source) and `--no-directory` (skips installing any local directory path dependencies, you can omit this if you don't have any).
0 commit comments