diff --git a/Dockerfile b/Dockerfile index 3953a27..20cfc8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ ARG PROJECT_REF=master ARG DISTRO ARG PROFILES ARG PIP_PACKAGES="" +ARG DIST_PACKAGES="" ARG PLUGIN=no ARG PYTHON3=no diff --git a/README.md b/README.md index 1cc3966..b14e6fb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/scripts/install_packages.sh b/scripts/install_packages.sh index 2b54be7..bc50b8a 100755 --- a/scripts/install_packages.sh +++ b/scripts/install_packages.sh @@ -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}"