Author SHA1 Message Date
kesslerpe96777 af0ecea9b2 Add built Docker image [skip ci] 2026-05-12 13:30:31 +00:00
kesslerpe96777 ccc3927300 Add built Docker image [skip ci] 2026-05-12 12:59:24 +00:00
kesslerpe96777 7293f0cff9 .drone.yml aktualisiert
continuous-integration/drone/push Build is passing
2026-05-12 12:58:50 +00:00
kesslerpe96777 35d63000f9 Dockerfile aktualisiert
continuous-integration/drone/push Build is failing
2026-05-12 12:52:38 +00:00
3 changed files with 16 additions and 22 deletions
+9 -15
View File
@@ -42,26 +42,20 @@ steps:
- git config --global user.email "drone@ci.local"
- git config --global user.name "Drone CI"
# Remote setzen
#- git remote set-url origin https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2
# Eigenes Repo klonen (mit Token-Auth)
- git clone https://kesslerpe96777:$GITEA_TOKEN@git.efi.th-nuernberg.de/gitea/kesslerpe96777/EinfuehrungInDocker_Pipeline2.git
- cd EinfuehrungInDocker_Pipeline2
# Repo clonen
- git clone https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2.git
- cd EinfuehrungInDocker_Pipeline
# Branch wechseln oder erstellen
# Branch wechseln oder neu erstellen
- git checkout drone-artifacts || git checkout -b drone-artifacts
# Artifact löschen und neu hinzufügen
- git rm image.tar
# Altes Artifact löschen (|| true falls noch nicht da)
- git rm image.tar || true
- cp $DRONE_WORKSPACE/image.tar .
- git add image.tar
# Commit nur wenn Änderungen vorhanden
# Commit nur wenn Änderungen
- git commit -m "Add built Docker image [skip ci]" || echo "Nothing to commit"
# Pull vor Push (um Konflikte zu vermeiden)
- git pull || true
# Push
- git push
# Push (-u beim ersten Mal damit der neue Branch upstream gesetzt wird)
- git push -u origin drone-artifacts
+7 -7
View File
@@ -1,5 +1,5 @@
# Base-Image
FROM alpine:3.22 AS builder
# Base-Image
FROM alpine:3.23 AS builder
# Pakete installieren + Updates einspielen
RUN apk upgrade --no-cache && apk add --no-cache gcc musl-dev
@@ -15,7 +15,7 @@ RUN gcc -O2 -o deployment deployment.c
# Base-Image
FROM alpine:3.22
FROM alpine:3.23
# Sicherheitsupdates einspielen
RUN apk upgrade --no-cache
@@ -28,9 +28,9 @@ COPY --from=builder /app/deployment /app/deployment
# Verzeichnis für Ausgabe anlegen + User erstellen
RUN addgroup -S appuser \
&& adduser -S appuser -G appuser \
&& mkdir /output \
&& chown -R appuser:appuser /app /output
&& adduser -S appuser -G appuser \
&& mkdir /output \
&& chown -R appuser:appuser /app /output
# Datavolume für Ausgabe
VOLUME ["/output"]
@@ -40,7 +40,7 @@ USER appuser
# Healthcheck
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD test -s /output/output.txt || exit 1
CMD test -s /output/output.txt || exit 1
# Ausgabe wird ins Volume geschrieben
ENTRYPOINT ["/bin/sh", "-c"]
BIN
View File
Binary file not shown.