Compare commits

...

11 Commits
main ... main

Author SHA1 Message Date
98422eecdd Ihh Ahhh 2026-04-25 12:17:35 +00:00
5814197430 Dockerfile aktualisiert
Kikeriki
2026-04-25 12:16:28 +00:00
9fd4455348 .drone.yml aktualisiert
Quack
2026-04-25 12:00:38 +00:00
26a57702d7 Muh 2026-04-25 11:52:34 +00:00
bd778673a2 Mäh 2026-04-25 13:45:14 +02:00
4bb7b1de7b wuff 2026-04-25 13:42:20 +02:00
8027e9e2ee Miau 2026-04-25 13:39:06 +02:00
a86e31d69a Changed Dockerfile to chainguard 2026-04-25 13:37:35 +02:00
07efd2bc17 .drone.yml aktualisiert 2026-04-11 11:55:50 +00:00
cd3a2c263e merge upstream 2026-04-11 11:51:29 +00:00
d16a6d8964 Miau 2026-04-11 13:49:08 +02:00
2 changed files with 28 additions and 10 deletions

View File

@ -46,14 +46,14 @@ steps:
#- git remote set-url origin https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2
# Repo clonen
- git clone https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2.git
- cd EinfuehrungInDocker_Pipeline
- git clone https://git.efi.th-nuernberg.de/gitea/schreinerma97192/EinfuehrungInDocker_Pipeline2.git
- cd EinfuehrungInDocker_Pipeline2
# Branch wechseln oder erstellen
- git checkout drone-artifacts || git checkout -b drone-artifacts
# Artifact löschen und neu hinzufügen
- git rm image.tar
- git rm -f image.tar || true
- cp $DRONE_WORKSPACE/image.tar .
- git add image.tar

View File

@ -1,22 +1,40 @@
# BUILD STAGE
# Base-Image
FROM ubuntu:latest
FROM cgr.dev/chainguard/wolfi-base:latest AS build
# Pakete installieren
RUN apt-get update
RUN apt-get install -y build-essential gcc curl vim net-tools
RUN apk update
RUN apk add build-base gcc
# Arbeitsverzeichnis setzen
WORKDIR /app
# alles kopieren
COPY . .
COPY deployment.c .
# Code kompilieren
RUN gcc -o deployment deployment.c
# RUNTIME STAGE
FROM cgr.dev/chainguard/wolfi-base:latest
RUN adduser -D appuser
RUN mkdir -p /output && chown -R appuser:appuser /output
USER appuser
WORKDIR /app
COPY --from=build /app/deployment .
VOLUME ["/output"]
HEALTHCHECK CMD test -f /output/output.txt || exit 1
# Verzeichnis für Ausgabe anlegen
RUN mkdir /output
# RUN mkdir /output
# Ausgabe wird ins Container-Dateisystem geschrieben
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]