2. versuch

This commit is contained in:
2026-03-17 23:40:53 +01:00
parent 2b76b3a434
commit 7832b40a01
2 changed files with 31 additions and 37 deletions

View File

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