dev #1

Merged
pi-farm merged 5 commits from dev into main 2026-03-18 00:45:21 +00:00
2 changed files with 31 additions and 37 deletions
Showing only changes of commit 7832b40a01 - Show all commits

View File

@@ -18,13 +18,12 @@ ARG BUILD_MAINTAINER
LABEL build_version="${BUILD_MAINTAINER} version: ${BUILD_APP_VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="${BUILD_MAINTAINER} version: ${BUILD_APP_VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="${BUILD_MAINTAINER}" LABEL maintainer="${BUILD_MAINTAINER}"
# RHEL nutzt microdnf. Wir installieren xz (für tar) und shadow-utils (für useradd) # 1. EPEL und Basis-Tools (shadow-utils ist kritisch für useradd!)
RUN microdnf update -y && \ RUN microdnf install -y --nodocs \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
microdnf update -y && \
microdnf install -y --nodocs \ microdnf install -y --nodocs \
xz \ xz tar shadow-utils tzdata && \
tar \
shadow-utils \
tzdata && \
microdnf clean all microdnf clean all
# add s6 overlay # add s6 overlay
@@ -56,21 +55,20 @@ ENV HOME="/root" \
VIRTUAL_ENV=/lsiopy \ VIRTUAL_ENV=/lsiopy \
PATH="/lsiopy/bin:$PATH" PATH="/lsiopy/bin:$PATH"
RUN echo "**** install packages and locales ****" && \ # 2. Pakete installieren
RUN echo "**** install packages ****" && \
microdnf install -y --nodocs \ microdnf install -y --nodocs \
glibc-langpack-de \ glibc-all-langpacks \
curl \ curl jq nmap-ncat cronie && \
jq \ microdnf clean all
nmap-ncat \
cronie && \ # 3. User und Verzeichnisse (getrennt vom Paket-Install!)
echo "**** create user and folders ****" && \ RUN echo "**** create user and folders ****" && \
# In RHEL prüfen wir, ob die Gruppe existiert, bevor wir sie anlegen if ! getent group ${BUILD_APP_GID} >/dev/null; then \
groupadd -g ${BUILD_APP_GID} ${BUILD_APP_USER} || true && \ groupadd -g ${BUILD_APP_GID} ${BUILD_APP_USER}; \
fi && \
useradd -u ${BUILD_APP_UID} -g ${BUILD_APP_GID} -d /config -s /bin/false ${BUILD_APP_USER} && \ useradd -u ${BUILD_APP_UID} -g ${BUILD_APP_GID} -d /config -s /bin/false ${BUILD_APP_USER} && \
mkdir -p /app /config /defaults /lsiopy && \ mkdir -p /app /config /defaults /lsiopy
echo "**** cleanup ****" && \
microdnf clean all && \
rm -rf /tmp/* /var/tmp/*
# 7. Lokale Skripte kopieren und Ausführungsrechte für S6 reparieren # 7. Lokale Skripte kopieren und Ausführungsrechte für S6 reparieren
ADD https://git.pi-farm.de/pi-farm/s6-overlay/archive/stable.tar.gz /tmp ADD https://git.pi-farm.de/pi-farm/s6-overlay/archive/stable.tar.gz /tmp

View File

@@ -17,15 +17,12 @@ ARG BUILD_MAINTAINER
LABEL build_version="${BUILD_MAINTAINER} version: ${BUILD_APP_VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="${BUILD_MAINTAINER} version: ${BUILD_APP_VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="${BUILD_MAINTAINER}" LABEL maintainer="${BUILD_MAINTAINER}"
# 1. EPEL Repository und Grundpakete für RHEL/UBI installieren # 1. EPEL und Basis-Tools (shadow-utils ist kritisch für useradd!)
RUN microdnf install -y --nodocs \ RUN microdnf install -y --nodocs \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
microdnf update -y && \ microdnf update -y && \
microdnf install -y --nodocs \ microdnf install -y --nodocs \
xz \ xz tar shadow-utils tzdata && \
tar \
shadow-utils \
tzdata && \
microdnf clean all microdnf clean all
# 2. S6 Overlay hinzufügen (explizit für aarch64) # 2. S6 Overlay hinzufügen (explizit für aarch64)
@@ -56,21 +53,20 @@ ENV HOME="/root" \
VIRTUAL_ENV=/lsiopy \ VIRTUAL_ENV=/lsiopy \
PATH="/lsiopy/bin:$PATH" PATH="/lsiopy/bin:$PATH"
# 6. Restliche Pakete (aus EPEL & UBI), User und Ordner anlegen # 2. Pakete installieren
RUN echo "**** install packages and locales ****" && \ RUN echo "**** install packages ****" && \
microdnf install -y --nodocs \ microdnf install -y --nodocs \
glibc-langpack-de \ glibc-all-langpacks \
curl \ curl jq nmap-ncat cronie && \
jq \ microdnf clean all
nmap-ncat \
cronie && \ # 3. User und Verzeichnisse (getrennt vom Paket-Install!)
echo "**** create abc user and make our folders ****" && \ RUN echo "**** create user and folders ****" && \
groupadd -g ${BUILD_APP_GID} ${BUILD_APP_USER} || true && \ if ! getent group ${BUILD_APP_GID} >/dev/null; then \
groupadd -g ${BUILD_APP_GID} ${BUILD_APP_USER}; \
fi && \
useradd -u ${BUILD_APP_UID} -g ${BUILD_APP_GID} -d /config -s /bin/false ${BUILD_APP_USER} && \ useradd -u ${BUILD_APP_UID} -g ${BUILD_APP_GID} -d /config -s /bin/false ${BUILD_APP_USER} && \
mkdir -p /app /config /defaults /lsiopy && \ mkdir -p /app /config /defaults /lsiopy
echo "**** cleanup ****" && \
microdnf clean all && \
rm -rf /tmp/* /var/tmp/*
# 7. Lokale Skripte kopieren und Ausführungsrechte für S6 reparieren # 7. Lokale Skripte kopieren und Ausführungsrechte für S6 reparieren
ADD https://git.pi-farm.de/pi-farm/s6-overlay/archive/stable.tar.gz /tmp ADD https://git.pi-farm.de/pi-farm/s6-overlay/archive/stable.tar.gz /tmp