22 lines
455 B
Docker

# Base-Image
FROM alpine
# Pakete installieren
RUN apk update
RUN apk install build-essential gcc curl vim net-tools
# 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"]