From 053cd67e3835086236caccda0d664bad307ace8f Mon Sep 17 00:00:00 2001 From: diodonfrost Date: Sat, 6 May 2023 01:57:19 +0200 Subject: [PATCH] feat(docker): add oraclelinux 9 image Build and push redhat oraclelinux docker image. --- .github/workflows/build.yml | 3 ++ .github/workflows/push.yml | 3 ++ oraclelinux-ansible/Dockerfile.oraclelinux-9 | 38 ++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 oraclelinux-ansible/Dockerfile.oraclelinux-9 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8fb918..f786cb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,6 +110,9 @@ jobs: - image: oraclelinux version: "8" platform: "linux/amd64,linux/arm64/v8" + - image: oraclelinux + version: "9" + platform: "linux/amd64,linux/arm64/v8" - image: rockylinux version: "8" platform: "linux/amd64" diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a508620..f78a44d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -111,6 +111,9 @@ jobs: - image: oraclelinux version: "8" platform: "linux/amd64,linux/arm64/v8" + - image: oraclelinux + version: "9" + platform: "linux/amd64,linux/arm64/v8" - image: rockylinux version: "8" platform: "linux/amd64" diff --git a/oraclelinux-ansible/Dockerfile.oraclelinux-9 b/oraclelinux-ansible/Dockerfile.oraclelinux-9 new file mode 100644 index 0000000..034298d --- /dev/null +++ b/oraclelinux-ansible/Dockerfile.oraclelinux-9 @@ -0,0 +1,38 @@ +FROM oraclelinux:9 +LABEL maintainer="diodonfrost " + +# Systemd install +RUN dnf -y update && dnf clean all; \ +(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ +rm -f /lib/systemd/system/multi-user.target.wants/*; \ +rm -f /etc/systemd/system/*.wants/*; \ +rm -f /lib/systemd/system/local-fs.target.wants/*; \ +rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ +rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ +rm -f /lib/systemd/system/basic.target.wants/*; \ +rm -f /lib/systemd/system/anaconda.target.wants/*; + +RUN dnf -y install \ + git \ + python3 \ + python3-pip \ + sudo \ + openssh-server \ + openssh-clients \ + unzip \ + tar \ + rsync \ + fuse-libs \ + && dnf clean all + +RUN python3 -m pip install --upgrade pip && \ + python3 -m pip install ansible +RUN ln -s /usr/local/bin/ansible* /usr/bin/ + +RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers + +RUN mkdir /etc/ansible && echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts + +VOLUME ["/sys/fs/cgroup"] + +ENTRYPOINT ["/usr/sbin/init"]