forked from freudenreichan/EinfuehrungInDocker_Pipeline2
21 lines
519 B
Docker
21 lines
519 B
Docker
# Base-Image
|
|
FROM ubuntu:latest
|
|
|
|
# Pakete installieren
|
|
RUN apt-get update && apt-get install -y build-essential gcc curl vim net-tools
|
|
|
|
# Arbeitsverzeichnis setzen
|
|
WORKDIR /app
|
|
|
|
# alles kopieren --> nur noch deployment.c 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 ["/bin/bash", "-c"]
|
|
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"] |