From b73ae21f355d441d4024d4fe93298f4e5b95ea9b Mon Sep 17 00:00:00 2001 From: Alex-Welsh Date: Tue, 22 Aug 2023 10:55:56 +0100 Subject: [PATCH] Allow different kayobe container image base images This change adds an argument to change the base image when building a kayobe container image. This is required for the Zed release of Openstack because there is no support for CentOS 8. --- docker/kayobe/Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docker/kayobe/Dockerfile b/docker/kayobe/Dockerfile index 990c004..3ead031 100644 --- a/docker/kayobe/Dockerfile +++ b/docker/kayobe/Dockerfile @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1.2 -FROM quay.io/centos/centos:stream8 +ARG BASE_IMAGE="quay.io/centos/centos:stream8" +FROM ${BASE_IMAGE} MAINTAINER "Will Szumski" # Unclear at this time if different environments will change @@ -22,13 +23,22 @@ ENV container docker # VOLUME [ "/sys/fs/cgroup" ] # CMD ["/usr/sbin/init"] +RUN echo $BASE_IMAGE +RUN echo "$BASE_IMAGE" +RUN echo ${BASE_IMAGE} +RUN echo "${BASE_IMAGE}" RUN dnf install epel-release -y && \ dnf update -y --nobest && \ + if [ "$BASE_IMAGE" == "rockylinux:9" ] ; then \ + dnf install -y gcc git vim python3-pyyaml \ + libffi-devel sudo which openssh-server e2fsprogs rsync \ + diffstat diffutils debootstrap procps-ng gdisk util-linux \ + dosfstools lvm2 kpartx systemd-udev bash-completion ; else \ dnf install -y gcc git vim python3-pyyaml python3-virtualenv \ libffi-devel sudo which openssh-server e2fsprogs rsync \ diffstat diffutils debootstrap procps-ng gdisk util-linux \ - dosfstools lvm2 kpartx systemd-udev bash-completion && \ + dosfstools lvm2 kpartx systemd-udev bash-completion ; fi && \ dnf clean all # Configure lvm not to use udev for device discovery. This allows you to use