23 lines
445 B
Docker
23 lines
445 B
Docker
# Base-Image
|
|
FROM alpine AS build-env
|
|
|
|
# Pakete installieren
|
|
RUN apk add --no-cache build-base
|
|
|
|
|
|
# Arbeitsverzeichnis setzen
|
|
WORKDIR /app
|
|
|
|
# alles kopieren
|
|
COPY deployment.c .
|
|
|
|
# Code kompilieren
|
|
RUN gcc -o deployment deployment.c
|
|
|
|
# Verzeichnis für Ausgabe anlegen
|
|
RUN mkdir /output
|
|
|
|
|
|
# Ausgabe wird ins Container-Dateisystem geschrieben
|
|
ENTRYPOINT ["/app/deployment"]
|
|
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"] |