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

This commit is contained in:
Aaron Voelker 2026-05-17 16:10:55 +00:00
parent 4c578ea2c2
commit af81140fa3

View File

@ -1,33 +1,21 @@
FROM node:18-alpine # Base-Image
FROM alpine AS build-env
# Arbeitsverzeichnis # Pakete installieren
RUN akp add --no-cache biuld-base curl
# Arbeitsverzeichnis setzen
WORKDIR /app WORKDIR /app
# User anlegen (kein root!) # alles kopieren
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
# Dependencies zuerst (Cache Vorteil)
COPY package*.json ./
RUN npm install --production
# Rest kopieren
COPY . . COPY . .
# Volume für Output # Code kompilieren
VOLUME ["/data"] RUN gcc -o deployment deployment.c
# Rechte setzen # Verzeichnis für Ausgabe anlegen
RUN chown -R appuser:appgroup /app /data RUN mkdir /output
# User wechseln # Ausgabe wird ins Container-Dateisystem geschrieben
USER appuser ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
# Port (falls Webapp)
EXPOSE 8080
# Healthcheck
HEALTHCHECK --interval=30s --timeout=5s \
CMD wget -qO- http://localhost:8080 || exit 1
# Start
CMD ["npm", "start"]