Update Dockerfile
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing

This commit is contained in:
Emma Arnold 2026-04-11 11:43:27 +00:00
parent dea458fcb2
commit ff4d035d4f

View File

@ -1,9 +1,9 @@
# Base-Image
FROM ubuntu:latest
FROM alpine3.20 AS build-env
# Pakete installieren
RUN apt-get update
RUN apt-get install -y build-essential gcc curl vim net-tools
RUN apt-get install --no-cache -y build-essential gcc curl vim net-tools
# Arbeitsverzeichnis setzen
WORKDIR /app
@ -17,6 +17,11 @@ RUN gcc -o deployment deployment.c
# Verzeichnis für Ausgabe anlegen
RUN mkdir /output
USER appuser
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Ausgabe wird ins Container-Dateisystem geschrieben
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]