Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 166acf7d78 | |||
| 577991512b | |||
| 3f7e54837b | |||
| 725af0162e | |||
| 94f387a60c | |||
| 69ef92e42f |
@ -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
|
||||||
|
|
||||||
|
|||||||
24
Dockerfile
24
Dockerfile
@ -1,22 +1,20 @@
|
|||||||
# Base-Image
|
# syntax=docker/dockerfile:1
|
||||||
FROM ubuntu:latest
|
|
||||||
|
|
||||||
# Pakete installieren
|
############################
|
||||||
RUN apt-get update
|
# 1) Builder: compilen
|
||||||
RUN apt-get install -y build-essential gcc curl vim net-tools
|
############################
|
||||||
|
FROM alpine:3.20 AS builder
|
||||||
|
|
||||||
# Arbeitsverzeichnis setzen
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# alles kopieren
|
# Build-Tools nur im Builder
|
||||||
COPY . .
|
RUN apk add --no-cache build-base
|
||||||
|
|
||||||
# Code kompilieren
|
# Nur die C-Datei kopieren (kleinerer Build-Context / besserer Cache)
|
||||||
RUN gcc -o deployment deployment.c
|
COPY deployment.c .
|
||||||
|
|
||||||
# Verzeichnis für Ausgabe anlegen
|
# Kompilieren (statisch linken -> runtime braucht keine libc)
|
||||||
RUN mkdir /output
|
RUN gcc -O2 -static -s -o deployment deployment.c
|
||||||
|
|
||||||
# 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"]
|
||||||
Loading…
x
Reference in New Issue
Block a user