Dockerfile aktualisiert
This commit is contained in:
parent
df25622098
commit
947045c0c0
13
Dockerfile
13
Dockerfile
@ -1,8 +1,8 @@
|
||||
# Base-Image
|
||||
FROM alpine:3.22 AS builder
|
||||
|
||||
# Pakete installieren
|
||||
RUN apk add --no-cache gcc musl-dev
|
||||
# Pakete installieren + Updates einspielen
|
||||
RUN apk upgrade --no-cache && apk add --no-cache gcc musl-dev
|
||||
|
||||
# Arbeitsverzeichnis setzen
|
||||
WORKDIR /app
|
||||
@ -17,6 +17,9 @@ RUN gcc -O2 -o deployment deployment.c
|
||||
# Base-Image
|
||||
FROM alpine:3.22
|
||||
|
||||
# Sicherheitsupdates einspielen
|
||||
RUN apk upgrade --no-cache
|
||||
|
||||
# Arbeitsverzeichnis setzen
|
||||
WORKDIR /app
|
||||
|
||||
@ -35,14 +38,10 @@ VOLUME ["/output"]
|
||||
# nicht als root laufen
|
||||
USER appuser
|
||||
|
||||
#update
|
||||
apt update && apt upgrade -y
|
||||
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD test -s /output/output.txt || exit 1
|
||||
|
||||
# Ausgabe wird ins Volume geschrieben
|
||||
ENTRYPOINT ["/bin/sh", "-c"]
|
||||
CMD ["touch /output/output.txt && ./deployment 10 >> /output/output.txt & tail -f /output/output.txt"]
|
||||
CMD ["touch /output/output.txt && ./deployment 10 >> /output/output.txt & tail -f /output/output.txt"]
|
||||
Loading…
x
Reference in New Issue
Block a user