Jelajahi Sumber

example cannot work, pip needs --requirement

The example is not explicit, but the requirements.txt file is most likely a list of requirements (i.e. list of packages to be installed)
and not a python package itself. As such it needs the "--requirements" or "-r" option.

Signed-off-by: Anthon van der Neut <anthon@mnt.org>
Anthon van der Neut 9 tahun lalu
induk
melakukan
8c1d0e31b4
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      docs/articles/dockerfile_best-practices.md

+ 1 - 1
docs/articles/dockerfile_best-practices.md

@@ -312,7 +312,7 @@ specifically required files change.
 For example:
 For example:
 
 
     COPY requirements.txt /tmp/
     COPY requirements.txt /tmp/
-    RUN pip install /tmp/requirements.txt
+    RUN pip install --requirement /tmp/requirements.txt
     COPY . /tmp/
     COPY . /tmp/
 
 
 Results in fewer cache invalidations for the `RUN` step, than if you put the
 Results in fewer cache invalidations for the `RUN` step, than if you put the