Merge "Introduce extra *dep parameter"
This commit is contained in:
commit
67689b87e2
|
@ -13,6 +13,8 @@ ARG PIP_ARGS=""
|
|||
ARG DIST_PACKAGES=""
|
||||
ARG PLUGIN=no
|
||||
ARG PYTHON3=no
|
||||
ARG EXTRA_BINDEP=""
|
||||
ARG EXTRA_PYDEP=""
|
||||
|
||||
ARG UID=42424
|
||||
ARG GID=42424
|
||||
|
@ -23,6 +25,6 @@ ARG SPICE_REPO=https://gitlab.freedesktop.org/spice/spice-html5.git
|
|||
ARG SPICE_REF=spice-html5-0.1.6
|
||||
|
||||
COPY scripts /opt/loci/scripts
|
||||
COPY bindep.txt pydep.txt /opt/loci/
|
||||
ADD bindep.txt pydep.txt $EXTRA_BINDEP $EXTRA_PYDEP /opt/loci/
|
||||
|
||||
RUN /opt/loci/scripts/install.sh
|
||||
|
|
|
@ -88,6 +88,10 @@ For more advanced building you can use docker build arguments to define:
|
|||
* `PIP_ARGS` Specify additional pip's parameters you would like.
|
||||
* `DIST_PACKAGES` Specify additional distribution packages you would like
|
||||
installed.
|
||||
* `EXTRA_BINDEP` Specify a bindep-* file to add in the container. It would
|
||||
be considered next to the default bindep.txt.
|
||||
* `EXTRA_PYDEP` Specify a pydep-* file to add in the container. It would
|
||||
be considered next to the default pydep.txt.
|
||||
|
||||
This makes it really easy to integrate LOCI images into your development or
|
||||
CI/CD workflow, for example, if you wanted to build an image from [this
|
||||
|
|
|
@ -78,8 +78,10 @@ if [[ "${PLUGIN}" == "no" ]]; then
|
|||
$(dirname $0)/create_user.sh
|
||||
$(dirname $0)/setup_pip.sh
|
||||
$(dirname $0)/pip_install.sh bindep
|
||||
PACKAGES=($(bindep -f /opt/loci/pydep.txt -b -l newline ${PROJECT} ${PROFILES} ${python3} || :))
|
||||
$(dirname $0)/pip_install.sh ${PACKAGES[@]}
|
||||
for file in /opt/loci/pydep*; do
|
||||
PYDEP_PACKAGES+=($(bindep -f $file -b -l newline ${PROJECT} ${PROFILES} ${python3} || :))
|
||||
done
|
||||
$(dirname $0)/pip_install.sh ${PYDEP_PACKAGES[@]}
|
||||
fi
|
||||
|
||||
if [[ ${PROJECT} == 'nova' ]]; then
|
||||
|
|
|
@ -6,7 +6,9 @@ if [[ "${PYTHON3}" != "no" ]]; then
|
|||
python3=python3
|
||||
fi
|
||||
|
||||
PACKAGES=($(bindep -f /opt/loci/bindep.txt -b -l newline ${PROJECT} ${PROFILES} ${python3} || :))
|
||||
for file in /opt/loci/bindep*; do
|
||||
PACKAGES+=($(bindep -f $file -b -l newline ${PROJECT} ${PROFILES} ${python3} || :))
|
||||
done
|
||||
|
||||
if [[ ! -z ${PACKAGES} ]]; then
|
||||
case ${distro} in
|
||||
|
|
Loading…
Reference in New Issue