Compare commits
6 Commits
main
...
ubuntuOrig
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a9e363852 | |||
| 86a45d2708 | |||
| f195da7021 | |||
| 14535e58b6 | |||
| f2b91dba26 | |||
| 644c7e7685 |
13
Dockerfile
13
Dockerfile
@ -1,5 +1,5 @@
|
|||||||
# Base-Image
|
# Base-Image
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:latest AS build_stage
|
||||||
|
|
||||||
# Pakete installieren
|
# Pakete installieren
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
@ -14,9 +14,18 @@ COPY . .
|
|||||||
# Code kompilieren
|
# Code kompilieren
|
||||||
RUN gcc -o deployment deployment.c
|
RUN gcc -o deployment deployment.c
|
||||||
|
|
||||||
|
FROM alpine AS runtime
|
||||||
|
|
||||||
|
RUN apk add --no-cache bash
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=build_stage /app/deployment .
|
||||||
|
|
||||||
# Verzeichnis für Ausgabe anlegen
|
# Verzeichnis für Ausgabe anlegen
|
||||||
RUN mkdir /output
|
RUN mkdir /output
|
||||||
|
|
||||||
# Ausgabe wird ins Container-Dateisystem geschrieben
|
# Ausgabe wird ins Container-Dateisystem geschrieben
|
||||||
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