Compare commits

...

4 Commits
main ... main

Author SHA1 Message Date
75e72bbb1d Dockerfile aktualisiert 2026-05-15 11:10:26 +00:00
1ed3106b5f Dockerfile aktualisiert 2026-05-15 11:06:45 +00:00
2ca0dc5474 .drone.yml aktualisiert 2026-04-11 11:44:37 +00:00
dc6b1a3454 Dockerfile aktualisiert 2026-04-11 11:27:50 +00:00
2 changed files with 21 additions and 16 deletions

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

View File

@ -1,22 +1,27 @@
# Base-Image FROM alpine:3.21 AS build
FROM ubuntu:latest
# Pakete installieren RUN apk add --no-cache gcc musl-dev
RUN apt-get update
RUN apt-get install -y build-essential gcc curl vim net-tools
# Arbeitsverzeichnis setzen
WORKDIR /app WORKDIR /app
# alles kopieren
COPY . . COPY . .
# Code kompilieren
RUN gcc -o deployment deployment.c RUN gcc -o deployment deployment.c
# Verzeichnis für Ausgabe anlegen FROM alpine:3.21
RUN mkdir /output
# Ausgabe wird ins Container-Dateisystem geschrieben RUN adduser -D -u 1000 appuser
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"] WORKDIR /app
RUN mkdir /output && chown appuser:appuser /output
COPY --from=build /app/deployment .
RUN chown appuser:appuser ./deployment
VOLUME ["/output"]
USER appuser
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD test -f /output/output.txt || exit 1
CMD ["sh", "-c", "./deployment 10 > /output/output.txt"]