From 00fabab06ef9f83e6aeac59b14bd11fc1d72e3c3 Mon Sep 17 00:00:00 2001 From: "David M. Klein" <4+leander19961@noreply.localhost> Date: Wed, 26 Aug 2026 10:04:05 +0200 Subject: [PATCH] docker/Dockerfile aktualisiert --- docker/Dockerfile | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3733e84..6047663 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,31 +1,30 @@ -FROM almalinux:latest +FROM almalinux:10 -RUN dnf install -y \ +# dnf-plugins-core -> "dnf download" +# createrepo_c -> createrepo_c + modifyrepo_c +# rpm-sign -> rpmsign/rpmkeys (verify upstream sigs, re-sign with our key) +# gnupg2 -> gpg (generates/holds the mirror's own signing key) +# python3-pyyaml -> YAML parsing in sync_helpers.py +# git -> pulling the sources.yaml from a git repo (optional) +# curl -> fetching upstream gpgkeys +RUN dnf -y install \ dnf-plugins-core \ createrepo_c \ - nginx \ - cronie \ - git \ - jq \ - openssh-clients \ - wget \ - gnupg2 \ rpm-sign \ - appstream \ - appstream-compose \ - cpio \ + gnupg2 \ + python3-pyyaml \ + git \ + curl \ && dnf clean all -RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq &&\ - chmod +x /usr/local/bin/yq +WORKDIR /opt/rpm-mirror -COPY sync.sh /usr/local/bin/sync.sh -COPY entrypoint.sh /entrypoint.sh -COPY nginx.conf /etc/nginx/conf.d/repo.conf -RUN chmod +x /usr/local/bin/sync.sh /entrypoint.sh \ - && rm -f /etc/nginx/conf.d/default.conf +COPY sync.sh sync_helpers.py /opt/rpm-mirror/ +RUN chmod +x /opt/rpm-mirror/sync.sh -VOLUME /data/repo -EXPOSE 80 +COPY docker/syncer/entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file +# sync.sh needs root to write /etc/yum.repos.d/*.repo - default container +# user is root, don't change it. +ENTRYPOINT ["/entrypoint.sh"]