diff --git a/Dockerfile b/Dockerfile index b59ec3a99..f01507884 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,9 +31,10 @@ RUN if [ $(uname -m) = "x86_64" ]; then \ FROM docker.io/centos:centos8 -ARG PKGS_LIST=main-packages-list.txt +ENV PKGS_LIST=main-packages-list.txt +ARG EXTRA_PKGS_LIST -COPY ${PKGS_LIST} /tmp/main-packages-list.txt +COPY ${PKGS_LIST} ${EXTRA_PKGS_LIST} /tmp/ COPY prepare-image.sh /bin/ RUN prepare-image.sh && \ diff --git a/prepare-image.sh b/prepare-image.sh index 25bd59aa8..3ee877d72 100755 --- a/prepare-image.sh +++ b/prepare-image.sh @@ -5,6 +5,9 @@ set -ex dnf install -y python3 python3-requests curl https://raw.githubusercontent.com/openstack/tripleo-repos/master/tripleo_repos/main.py | python3 - -b master current-tripleo dnf upgrade -y -dnf --setopt=install_weak_deps=False install -y $(cat /tmp/main-packages-list.txt) +dnf --setopt=install_weak_deps=False install -y $(cat /tmp/${PKGS_LIST}) +if [[ -s /tmp/${EXTRA_PKGS_LIST} ]]; then + dnf --setopt=install_weak_deps=False install -y $(cat /tmp/${EXTRA_PKGS_LIST}) +fi dnf clean all rm -rf /var/cache/{yum,dnf}/*