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