Merge "Args: Add distrobution packages to args"

This commit is contained in:
Zuul 2018-02-16 18:02:06 +00:00 committed by Gerrit Code Review
commit 4bb6e654a1
3 changed files with 9 additions and 5 deletions

View File

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

View File

@ -71,9 +71,12 @@ For more advanced building you can use docker build arguments to define:
base image.
* `PROFILES` The bindep profiles to specify to configure which packages get
installed. This is a space sperated list.
* `PIP_PACKAGES` Specify additional packages you would like installed. The
only caveat is these packages must exist in your WHEELS tarball. So if you
wanted to include rpdb, you would need to have built that into your WHEELS.
* `PIP_PACKAGES` Specify additional python packages you would like installed.
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.
* `DIST_PACKAGES` Specify additional distribution packages you would like
installed.
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

View File

@ -11,10 +11,10 @@ PACKAGES=($(bindep -f /opt/loci/bindep.txt -b -l newline ${PROJECT} ${PROFILES}
if [[ ! -z ${PACKAGES} ]]; then
case ${distro} in
debian|ubuntu)
apt-get install -y --no-install-recommends ${PACKAGES[@]}
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${DIST_PACKAGES}
;;
centos)
yum -y --setopt=skip_missing_names_on_install=False install ${PACKAGES[@]}
yum -y --setopt=skip_missing_names_on_install=False install ${PACKAGES[@]} ${DIST_PACKAGES}
;;
*)
echo "Unknown distro: ${distro}"