Tobias Niegratschka f5fbdc5a10
Some checks failed
continuous-integration/drone/push Build is failing
Dockerfile aktualisiert
2026-04-25 13:50:06 +00:00

28 lines
658 B
Docker

# Base-Image (Bleibt Alpine 3.15 für deine Aufgabe)
FROM alpine:3.23.3
# 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"]