From 87242e5685992358cd8326cd74cf2f7d2f18be18 Mon Sep 17 00:00:00 2001 From: Carlos Felipe S Pinheiro Date: Fri, 24 Nov 2023 21:40:49 -0300 Subject: [PATCH] Add containers for Debian and particularly 12.0 --- .github/workflows/container-publish.yml | 4 ++++ CONTRIBUTORS.md | 1 + debian/Containerfile | 31 +++++++++++++++++++++++++ debian/Containerfile-12.0 | 31 +++++++++++++++++++++++++ debian/container_exit.sh | 6 +++++ debian/excludes | 1 + 6 files changed, 74 insertions(+) create mode 100644 debian/Containerfile create mode 100644 debian/Containerfile-12.0 create mode 100755 debian/container_exit.sh create mode 100644 debian/excludes diff --git a/.github/workflows/container-publish.yml b/.github/workflows/container-publish.yml index 3980b5e..6610833 100644 --- a/.github/workflows/container-publish.yml +++ b/.github/workflows/container-publish.yml @@ -74,6 +74,10 @@ jobs: version: latest context: leap file: leap/Containerfile + - os: debian + version: "12.0" + context: debian + file: debian/Containerfile-12.0 permissions: contents: read diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 168e774..2301c9f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,3 +6,4 @@ * Ryan Thomson * Brian Phan * Simppa Äkäslompolo (@sjjamsa) +* Carlos Felipe S Pinheiro diff --git a/debian/Containerfile b/debian/Containerfile new file mode 100644 index 0000000..fda1074 --- /dev/null +++ b/debian/Containerfile @@ -0,0 +1,31 @@ +FROM debian + + +# ----- install vital packages ----- +ENV DEBIAN_FRONTEND teletype +RUN apt-get update && apt-get install -y --no-install-recommends \ + kmod \ + systemd-sysv \ + dbus \ + openssh-client \ + openssh-server \ + isc-dhcp-client \ + pciutils \ + strace \ + nfs-common \ + ethtool\ + ifupdown \ + linux-image-$(dpkg --print-architecture) \ + ifmetric \ + netbase && \ + rm -rf /var/lib/apt/lists/* + + +COPY excludes /etc/warewulf/ +COPY container_exit.sh /etc/warewulf/ + +CMD [ "/bin/echo", "-e", \ + "This image is intended to be used with the Warewulf cluster management and", \ + "\nprovisioning system.", \ + "\n", \ + "\nFor more information about Warewulf, visit https://warewulf.org" ] diff --git a/debian/Containerfile-12.0 b/debian/Containerfile-12.0 new file mode 100644 index 0000000..28bc76e --- /dev/null +++ b/debian/Containerfile-12.0 @@ -0,0 +1,31 @@ +FROM debian:12.0 + + +# ----- install vital packages ----- +ENV DEBIAN_FRONTEND teletype +RUN apt-get update && apt-get install -y --no-install-recommends \ + kmod \ + systemd-sysv \ + dbus \ + openssh-client \ + openssh-server \ + isc-dhcp-client \ + pciutils \ + strace \ + nfs-common \ + ethtool\ + ifupdown \ + linux-image-$(dpkg --print-architecture) \ + ifmetric \ + netbase && \ + rm -rf /var/lib/apt/lists/* + + +COPY excludes /etc/warewulf/ +COPY container_exit.sh /etc/warewulf/ + +CMD [ "/bin/echo", "-e", \ + "This image is intended to be used with the Warewulf cluster management and", \ + "\nprovisioning system.", \ + "\n", \ + "\nFor more information about Warewulf, visit https://warewulf.org" ] diff --git a/debian/container_exit.sh b/debian/container_exit.sh new file mode 100755 index 0000000..11ce88f --- /dev/null +++ b/debian/container_exit.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -x +LANG=C +LC_CTYPE=C +export LANG LC_CTYPE +apt-get clean diff --git a/debian/excludes b/debian/excludes new file mode 100644 index 0000000..5be2a7e --- /dev/null +++ b/debian/excludes @@ -0,0 +1 @@ +/boot/