Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ca0dc5474 | |||
| dc6b1a3454 |
10
Dockerfile
10
Dockerfile
@ -1,9 +1,8 @@
|
||||
# Base-Image
|
||||
FROM ubuntu:latest
|
||||
FROM ubuntu:latest AS build
|
||||
|
||||
# Pakete installieren
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y build-essential gcc curl vim net-tools
|
||||
RUN apt-get update && apt-get install -y build-essential
|
||||
|
||||
# Arbeitsverzeichnis setzen
|
||||
WORKDIR /app
|
||||
@ -14,9 +13,12 @@ COPY . .
|
||||
# Code kompilieren
|
||||
RUN gcc -o deployment deployment.c
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
# Verzeichnis für Ausgabe anlegen
|
||||
RUN mkdir /output
|
||||
|
||||
COPY --from=build /app/deployment .
|
||||
# Ausgabe wird ins Container-Dateisystem geschrieben
|
||||
ENTRYPOINT ["/bin/bash", "-c"]
|
||||
ENTRYPOINT ["/bin/sh", "-c"]
|
||||
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
|
||||
Loading…
x
Reference in New Issue
Block a user