1
1
# syntax=docker/dockerfile:1.2
2
2
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}
4
8
MAINTAINER "Will Szumski" <
[email protected] >
5
9
6
10
# Unclear at this time if different environments will change
@@ -22,13 +26,21 @@ ENV container docker
22
26
# VOLUME [ "/sys/fs/cgroup" ]
23
27
24
28
# 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"
26
35
RUN dnf install epel-release -y && \
27
36
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 \
30
39
diffstat diffutils debootstrap procps-ng gdisk util-linux \
31
40
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 && \
32
44
dnf clean all
33
45
34
46
# Configure lvm not to use udev for device discovery. This allows you to use
@@ -37,12 +49,6 @@ RUN dnf install epel-release -y && \
37
49
RUN sed -i 's/# udev_rules = 1/udev_rules = 0/g' /etc/lvm/lvm.conf && \
38
50
sed -i 's/# udev_sync = 1/udev_sync = 0/g' /etc/lvm/lvm.conf
39
51
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
-
46
52
RUN python3 -m pip install docker six
47
53
48
54
ENV KAYOBE_USER=stack
0 commit comments