Compare commits

5 Commits
Author SHA1 Message Date
allamaaki80515 ecfcb3efa3 Dockerfile aktualisiert 2026-04-11 11:44:11 +00:00
allamaaki80515 6f34e1354c Dockerfile aktualisiert 2026-04-11 11:42:15 +00:00
allamaaki80515 2b85e26179 Dockerfile aktualisiert 2026-04-11 11:39:58 +00:00
allamaaki80515 a42486619c Dockerfile aktualisiert 2026-04-11 11:35:45 +00:00
allamaaki80515 ed5ee6a367 Dockerfile aktualisiert 2026-04-11 11:25:21 +00:00
2 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ steps:
fi
- name: security-scan
image: ghcr.io/aquasecurity/trivy:0.69.3
image: aquasec/trivy:latest
commands:
- trivy image --input image.tar --severity HIGH,CRITICAL --exit-code 1
+11 -5
View File
@@ -1,15 +1,19 @@
# Base-Image
FROM ubuntu:latest
#FROM ubuntu:latest
# Pakete installieren
RUN apt-get update
RUN apt-get install -y build-essential gcc curl vim net-tools
#RUN apt-get update && apt-get install -y build-essential gcc curl vim net-tools
# Stage 1: Bauen (mit Alpine + gcc)
FROM alpine:3.19 AS build-env
RUN apk add --no-cache gcc musl-dev
# Arbeitsverzeichnis setzen
WORKDIR /app
# alles kopieren
COPY . .
# alles kopieren --> nur noch deployment.c kopieren!
COPY deployment.c .
# Code kompilieren
RUN gcc -o deployment deployment.c
@@ -17,6 +21,8 @@ RUN gcc -o deployment deployment.c
# Verzeichnis für Ausgabe anlegen
RUN mkdir /output
#COPY --from=build-env /app/deployment /app/deployment
# Ausgabe wird ins Container-Dateisystem geschrieben
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]