Eric Sharifi 29eeeb41fb
Some checks failed
continuous-integration/drone/push Build is failing
changed to apk
2026-04-11 11:28:53 +00:00

26 lines
520 B
Docker

# Base-Image
FROM alpine:latest
# Pakete installieren
#RUN apt-get update
RUN apk add -y build-essential gcc curl vim net-tools
# User erstellen
RUN adduser -D appuser
USER appuser
# Arbeitsverzeichnis setzen
WORKDIR /app
# alles kopieren
COPY . .
# Code kompilieren
RUN gcc -o deployment deployment.c
# Verzeichnis für Ausgabe anlegen
RUN mkdir /output
# Ausgabe wird ins Container-Dateisystem geschrieben
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]