Skip to content

Commit

Permalink
Introduce separate ARG for extra packages list
Browse files Browse the repository at this point in the history
Convert the current PKGS_LIST to ENV as we should not really touch it.
Introduce the EXTRA_PKGS_LIST ARG to allow specifying a file
containing a list of extra packages to install.
The goal is to allow installing packages from different sources
to test them.
  • Loading branch information
elfosardo committed Nov 24, 2020
1 parent fdbf3e3 commit c8a2a7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
5 changes: 4 additions & 1 deletion prepare-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/*

0 comments on commit c8a2a7e

Please sign in to comment.