Compare commits
5
Commits
main
..
ecfcb3efa3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecfcb3efa3 | ||
|
|
6f34e1354c | ||
|
|
2b85e26179 | ||
|
|
a42486619c | ||
|
|
ed5ee6a367 |
+1
-1
@@ -26,7 +26,7 @@ steps:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: security-scan
|
- name: security-scan
|
||||||
image: ghcr.io/aquasecurity/trivy:0.69.3
|
image: aquasec/trivy:latest
|
||||||
commands:
|
commands:
|
||||||
- trivy image --input image.tar --severity HIGH,CRITICAL --exit-code 1
|
- trivy image --input image.tar --severity HIGH,CRITICAL --exit-code 1
|
||||||
|
|
||||||
|
|||||||
+11
-5
@@ -1,15 +1,19 @@
|
|||||||
# Base-Image
|
# Base-Image
|
||||||
FROM ubuntu:latest
|
#FROM ubuntu:latest
|
||||||
|
|
||||||
# Pakete installieren
|
# Pakete installieren
|
||||||
RUN apt-get update
|
#RUN apt-get update && apt-get install -y build-essential gcc curl vim net-tools
|
||||||
RUN 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
|
# Arbeitsverzeichnis setzen
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# alles kopieren
|
# alles kopieren --> nur noch deployment.c kopieren!
|
||||||
COPY . .
|
COPY deployment.c .
|
||||||
|
|
||||||
# Code kompilieren
|
# Code kompilieren
|
||||||
RUN gcc -o deployment deployment.c
|
RUN gcc -o deployment deployment.c
|
||||||
@@ -17,6 +21,8 @@ RUN gcc -o deployment deployment.c
|
|||||||
# Verzeichnis für Ausgabe anlegen
|
# Verzeichnis für Ausgabe anlegen
|
||||||
RUN mkdir /output
|
RUN mkdir /output
|
||||||
|
|
||||||
|
#COPY --from=build-env /app/deployment /app/deployment
|
||||||
|
|
||||||
# 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"]
|
||||||
Reference in New Issue
Block a user