Skip to content

Commit 7e2807e

Browse files
committed
Allow Rocky Linux 9 base image
This change adds an argument to change the base image when building a kayobe container image, with support for Rocky Linux 9. This is required for the Zed release of Openstack because there is no support for CentOS 8.
1 parent 5232d68 commit 7e2807e

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

docker/kayobe/Dockerfile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# syntax=docker/dockerfile:1.2
22

3-
FROM quay.io/centos/centos:stream8
3+
# NOTE: Currently supported images:
4+
# quay.io/centos/centos:stream8
5+
# rockylinux:9
6+
ARG BASE_IMAGE="quay.io/centos/centos:stream8"
7+
FROM ${BASE_IMAGE}
48
MAINTAINER "Will Szumski" <[email protected]>
59

610
# Unclear at this time if different environments will change
@@ -22,13 +26,21 @@ ENV container docker
2226
# VOLUME [ "/sys/fs/cgroup" ]
2327

2428
# CMD ["/usr/sbin/init"]
25-
29+
# Note on CentOS 8 rsync-3.1.3-14.el8 install:
30+
# Workaround rsync: --sparse-block=1024: unknown option
31+
# Hopepfully they have fixed this issue before this old
32+
# package is removed.
33+
# See: https://bugzilla.redhat.com/show_bug.cgi?id=2043753
34+
ARG BASE_IMAGE="quay.io/centos/centos:stream8"
2635
RUN dnf install epel-release -y && \
2736
dnf update -y --nobest && \
28-
dnf install -y gcc git vim python3-pyyaml python3-virtualenv \
29-
libffi-devel sudo which openssh-server e2fsprogs rsync \
37+
dnf install -y gcc git vim python3-pyyaml \
38+
libffi-devel sudo which openssh-server e2fsprogs \
3039
diffstat diffutils debootstrap procps-ng gdisk util-linux \
3140
dosfstools lvm2 kpartx systemd-udev bash-completion && \
41+
if [ "$(grep "^PRETTY_NAME=\"Rocky Linux 9" /etc/os-release)" ] ; then \
42+
dnf install -y rsync python3 python3-pip ; else \
43+
dnf install -y python3-virtualenv rsync-3.1.3-14.el8 ; fi && \
3244
dnf clean all
3345

3446
# Configure lvm not to use udev for device discovery. This allows you to use
@@ -37,12 +49,6 @@ RUN dnf install epel-release -y && \
3749
RUN sed -i 's/# udev_rules = 1/udev_rules = 0/g' /etc/lvm/lvm.conf && \
3850
sed -i 's/# udev_sync = 1/udev_sync = 0/g' /etc/lvm/lvm.conf
3951

40-
# Workaround: rsync: --sparse-block=1024: unknown option
41-
# Hoepfully they have fixed this issue before this old
42-
# package is removed.
43-
# See: https://bugzilla.redhat.com/show_bug.cgi?id=2043753
44-
RUN dnf install -y rsync-3.1.3-14.el8 && dnf clean all
45-
4652
RUN python3 -m pip install docker six
4753

4854
ENV KAYOBE_USER=stack

0 commit comments

Comments
 (0)