docker/Dockerfile aktualisiert
This commit is contained in:
+32
-7
@@ -1,20 +1,33 @@
|
||||
FROM almalinux:10
|
||||
|
||||
# Ohne UTF-8-Locale verstuemmeln appstreamcli und andere Tools Umlaute in
|
||||
# ihrer Ausgabe ("?ber" statt "über").
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8
|
||||
|
||||
# createrepo_c bringt auch modifyrepo_c mit.
|
||||
# libappstream-glib liefert appstreamcli fuer die optionale Validierung.
|
||||
RUN dnf -y install \
|
||||
createrepo_c \
|
||||
# python3 + PyYAML werden von appstream-gen.py gebraucht - nicht darauf
|
||||
# verlassen, dass das Basisimage sie zufaellig mitbringt.
|
||||
# gnupg2/rpm-sign sind fuer die spaetere Signierung vorgesehen.
|
||||
RUN dnf install -y \
|
||||
dnf-plugins-core \
|
||||
createrepo_c \
|
||||
appstream \
|
||||
git \
|
||||
jq \
|
||||
openssh-clients \
|
||||
python3 \
|
||||
python3-pyyaml \
|
||||
jq \
|
||||
cronie \
|
||||
appstream \
|
||||
gnupg2 \
|
||||
rpm-sign \
|
||||
findutils \
|
||||
util-linux-core \
|
||||
curl \
|
||||
&& dnf clean all
|
||||
|
||||
# yq (Go-Variante) fuer das YAML-Parsing in sync.sh
|
||||
# yq (Go-Variante) fuer das YAML-Parsing in sync.sh.
|
||||
# Version gepinnt: "latest" macht Builds nicht reproduzierbar und kann bei
|
||||
# einem Breaking Change der yq-Syntax den Sync stillschweigend zerlegen.
|
||||
ARG YQ_VERSION=v4.44.3
|
||||
RUN curl -fsSL -o /usr/local/bin/yq \
|
||||
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" \
|
||||
@@ -22,9 +35,21 @@ RUN curl -fsSL -o /usr/local/bin/yq \
|
||||
|
||||
COPY sync.sh /usr/local/bin/sync.sh
|
||||
COPY appstream-gen.py /usr/local/bin/appstream-gen.py
|
||||
COPY sync_helpers.py /usr/local/bin/sync_helpers.py
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/sync.sh \
|
||||
/usr/local/bin/appstream-gen.py \
|
||||
/usr/local/bin/entrypoint.sh
|
||||
|
||||
# Bewusst KEIN "VOLUME /srv/repo":
|
||||
# Ein VOLUME im Dockerfile legt beim Start ein anonymes Volume an. Wird in
|
||||
# docker-compose.yml ein benanntes Volume auf einen ANDEREN Pfad gemountet,
|
||||
# schreibt der Sync ins anonyme Volume, waehrend nginx das benannte (leere)
|
||||
# ausliefert. Genau dieser Fall ist hier schon einmal aufgetreten.
|
||||
# Das Mount kommt ausschliesslich aus docker-compose.yml.
|
||||
|
||||
# Ebenfalls bewusst nicht enthalten: nginx und cronie.
|
||||
# nginx laeuft als eigener Container (siehe docker-compose.yml), das
|
||||
# Sync-Intervall steuert entrypoint.sh per Sleep-Schleife.
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user