forked from freudenreichan/EinfuehrungInDocker_Pipeline2
21 lines
428 B
Docker
21 lines
428 B
Docker
# Base-Image
|
|
FROM alpine:3.21
|
|
|
|
# Pakete installieren
|
|
RUN apt add --no-cache build-base gcc
|
|
|
|
# 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"] |