forked from freudenreichan/EinfuehrungInDocker_Pipeline2
This commit is contained in:
parent
e124f67610
commit
b0ad53dc50
15
Dockerfile
15
Dockerfile
@ -1,8 +1,15 @@
|
|||||||
# Base-Image
|
# Base-Image (Bleibt Alpine 3.15 für deine Aufgabe)
|
||||||
FROM alpine:3.15
|
FROM alpine:3.15
|
||||||
|
|
||||||
# Pakete installieren
|
# Pakete installieren (Hier lag der Fehler: apk statt apt-get)
|
||||||
RUN apt-get install -y build-essential gcc curl vim net-tools
|
# 'build-base' ist das Alpine-Äquivalent zu 'build-essential'
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
build-base \
|
||||||
|
gcc \
|
||||||
|
curl \
|
||||||
|
vim \
|
||||||
|
net-tools \
|
||||||
|
bash
|
||||||
|
|
||||||
# Arbeitsverzeichnis setzen
|
# Arbeitsverzeichnis setzen
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@ -16,6 +23,6 @@ RUN gcc -o deployment deployment.c
|
|||||||
# Verzeichnis für Ausgabe anlegen
|
# Verzeichnis für Ausgabe anlegen
|
||||||
RUN mkdir /output
|
RUN mkdir /output
|
||||||
|
|
||||||
# Ausgabe wird ins Container-Dateisystem geschrieben
|
# Wichtig: Alpine hat standardmäßig keine bash, daher oben mit installiert
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
ENTRYPOINT ["/bin/bash", "-c"]
|
||||||
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
|
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
|
||||||
Loading…
x
Reference in New Issue
Block a user