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 168207c commit 5e0c7bb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ 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/

RUN 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}/*

Expand Down

0 comments on commit 5e0c7bb

Please sign in to comment.