From 86a45d2708d3d4fa1489bd7d180c2bf148047ffe Mon Sep 17 00:00:00 2001 From: Fabian Guth Date: Sat, 25 Apr 2026 13:57:43 +0000 Subject: [PATCH] ubuntu Build stage aber alpine prod UbuntuBased aber Multistage --- Dockerfile | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 089cd0c..0534ec7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,9 @@ # Base-Image -FROM alpine AS build_stage +FROM ubuntu:latest AS build_stage # Pakete installieren -RUN apk update -RUN apk add --no-cache build-base gcc curl vim net-tools -RUN apk add --no-cache bash +RUN apt-get update +RUN apt-get install -y build-essential gcc curl vim net-tools # Arbeitsverzeichnis setzen WORKDIR /app @@ -19,23 +18,13 @@ FROM alpine AS runtime RUN apk add --no-cache bash -#RUN adduser -u 1000 -g 1000 -D -s /bin/bash fabian - WORKDIR /app COPY --from=build_stage /app/deployment . # Verzeichnis für Ausgabe anlegen -#USER root -RUN mkdir /output && chown 1000:1000 /output -#USER fabian -USER 1000:1000 - -VOLUME ["/output"] - -#Healthcheck -HEALTHCHECK --interval=30s CMD test -f /output/output.txt || exit 1 +RUN mkdir /output # Ausgabe wird ins Container-Dateisystem geschrieben 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"] \ No newline at end of file