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 Jan 25, 2021
1 parent 916bdc6 commit 2a38412
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Dockerfile.ocp
@@ -1,8 +1,9 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.7

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
9 changes: 7 additions & 2 deletions prepare-image.sh
@@ -1,9 +1,14 @@
#!/usr/bin/bash

set -ex
set -euxo pipefail

dnf upgrade -y
xargs -rd'\n' dnf --setopt=install_weak_deps=False install -y < /tmp/main-packages-list.txt
xargs -rd'\n' dnf --setopt=install_weak_deps=False install -y < /tmp/${PKGS_LIST}
if [[ ! -z ${EXTRA_PKGS_LIST:-} ]]; then
if [[ -s /tmp/${EXTRA_PKGS_LIST} ]]; then
xargs -rd'\n' dnf --setopt=install_weak_deps=False install -y < /tmp/${EXTRA_PKGS_LIST}
fi
fi
mkdir -p /var/lib/ironic-inspector
sqlite3 /var/lib/ironic-inspector/ironic-inspector.db "pragma journal_mode=wal"
dnf remove -y sqlite
Expand Down

0 comments on commit 2a38412

Please sign in to comment.