add pip additional args

for example, in order to speed up, use the mirror of pypi:
--build-arg PIP_ARGS="-i https://pypi.tuna.tsinghua.edu.cn/simple"

Change-Id: I7f975c04c4dfd5b18d37a3f4b152a053374a79aa
This commit is contained in:
LiuYang 2018-03-29 10:46:49 +08:00
parent 2b4d9931e5
commit e2d5de285a
3 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ ARG PROJECT_REF=master
ARG DISTRO
ARG PROFILES
ARG PIP_PACKAGES=""
ARG PIP_ARGS=""
ARG DIST_PACKAGES=""
ARG PLUGIN=no
ARG PYTHON3=no

View File

@ -78,6 +78,7 @@ For more advanced building you can use docker build arguments to define:
The only caveat is these packages must exist in WHEELS form. So if
you wanted to include rpdb, you would need to have built that into your
WHEELS.
* `PIP_ARGS` Specify additional pip's parameters you would like.
* `DIST_PACKAGES` Specify additional distribution packages you would like
installed.

View File

@ -4,4 +4,4 @@ set -ex
packages=$@
pip install --no-cache-dir --only-binary :all: --no-compile -c /tmp/wheels/upper-constraints.txt --find-links /tmp/wheels/ ${packages}
pip install --no-cache-dir --only-binary :all: --no-compile -c /tmp/wheels/upper-constraints.txt --find-links /tmp/wheels/ ${PIP_ARGS} ${packages}