Tobias Niegratschka b0ad53dc50
Some checks failed
continuous-integration/drone/push Build is failing
Dockerfile aktualisiert
2026-04-25 13:48:22 +00:00

28 lines
656 B
Docker

# Base-Image (Bleibt Alpine 3.15 für deine Aufgabe)
FROM alpine:3.15
# Pakete installieren (Hier lag der Fehler: apk statt apt-get)
# 'build-base' ist das Alpine-Äquivalent zu 'build-essential'
RUN apk add --no-cache \
build-base \
gcc \
curl \
vim \
net-tools \
bash
# Arbeitsverzeichnis setzen
WORKDIR /app
# alles kopieren
COPY . .
# Code kompilieren
RUN gcc -o deployment deployment.c
# Verzeichnis für Ausgabe anlegen
RUN mkdir /output
# Wichtig: Alpine hat standardmäßig keine bash, daher oben mit installiert
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]