Compare commits

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

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ steps:
fi fi
- name: security-scan - name: security-scan
image: aquasec/trivy:latest image: ghcr.io/aquasecurity/trivy:0.69.3
commands: commands:
- trivy image --input image.tar --severity HIGH,CRITICAL --exit-code 1 - trivy image --input image.tar --severity HIGH,CRITICAL --exit-code 1
+4 -20
View File
@@ -1,6 +1,5 @@
# BUILD STAGE
# Base-Image # Base-Image
FROM debian:stable-slim AS build FROM ubuntu:latest
# Pakete installieren # Pakete installieren
RUN apt-get update RUN apt-get update
@@ -10,29 +9,14 @@ RUN apt-get install -y build-essential gcc curl vim net-tools
WORKDIR /app WORKDIR /app
# alles kopieren # alles kopieren
COPY deployment.c . COPY . .
# Code kompilieren # Code kompilieren
RUN gcc -o deployment deployment.c RUN gcc -o deployment deployment.c
# RUNTIME STAGE
FROM debian:stable-slim
RUN useradd -m appuser
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 # Verzeichnis für Ausgabe anlegen
# RUN mkdir /output RUN mkdir /output
# Ausgabe wird ins Container-Dateisystem geschrieben # Ausgabe wird ins Container-Dateisystem geschrieben
ENTRYPOINT ["/bin/bash", "-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"]