Compare commits

..

1 Commits
main ... main

Author SHA1 Message Date
1a0fcbbd12 .drone.yml aktualisiert 2026-04-11 11:45:33 +00:00
2 changed files with 7 additions and 17 deletions

View File

@ -47,13 +47,13 @@ steps:
# Repo clonen # Repo clonen
- git clone https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2.git - git clone https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2.git
- cd EinfuehrungInDocker_Pipeline2 - cd EinfuehrungInDocker_Pipeline
# Branch wechseln oder erstellen # Branch wechseln oder erstellen
- git checkout drone-artifacts || git checkout -b drone-artifacts - git checkout drone-artifacts || git checkout -b drone-artifacts
# Artifact löschen und neu hinzufügen # Artifact löschen und neu hinzufügen
- git rm --ignore-unmatch image.tar - git rm image.tar
- cp $DRONE_WORKSPACE/image.tar . - cp $DRONE_WORKSPACE/image.tar .
- git add image.tar - git add image.tar
@ -64,4 +64,4 @@ steps:
- git pull || true - git pull || true
# Push # Push
- git push --set-upstream origin drone-artifacts - git push

View File

@ -1,10 +1,9 @@
# Base-Image # Base-Image
FROM alpine:3.20 FROM ubuntu:latest
# Pakete installieren # Pakete installieren
RUN apk add --no-cache build-base gcc curl vim net-tools RUN apt-get update
# CVE update RUN apt-get install -y build-essential gcc curl vim net-tools
#RUN apk upgrade libssl3 libcrypto3 zlib
# Arbeitsverzeichnis setzen # Arbeitsverzeichnis setzen
WORKDIR /app WORKDIR /app
@ -17,16 +16,7 @@ RUN gcc -o deployment deployment.c
# Verzeichnis für Ausgabe anlegen # Verzeichnis für Ausgabe anlegen
RUN mkdir /output RUN mkdir /output
VOLUME /output
# User erstellen
RUN adduser -D appuser && chown /output appuser
USER appuser
#health
HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD pgrep deployment || exit 1
# Ausgabe wird ins Container-Dateisystem geschrieben # Ausgabe wird ins Container-Dateisystem geschrieben
ENTRYPOINT ["/bin/sh", "-c"] ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"] CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]