forked from freudenreichan/EinfuehrungInDocker_Pipeline2
Update Dockerfile
This commit is contained in:
parent
dea458fcb2
commit
ff4d035d4f
@ -1,9 +1,9 @@
|
||||
# Base-Image
|
||||
FROM ubuntu:latest
|
||||
FROM alpine3.20 AS build-env
|
||||
|
||||
# Pakete installieren
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y build-essential gcc curl vim net-tools
|
||||
RUN apt-get install --no-cache -y build-essential gcc curl vim net-tools
|
||||
|
||||
# Arbeitsverzeichnis setzen
|
||||
WORKDIR /app
|
||||
@ -17,6 +17,11 @@ RUN gcc -o deployment deployment.c
|
||||
# Verzeichnis für Ausgabe anlegen
|
||||
RUN mkdir /output
|
||||
|
||||
USER appuser
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD curl -f http://localhost:8080/health || exit 1
|
||||
|
||||
# Ausgabe wird ins Container-Dateisystem geschrieben
|
||||
ENTRYPOINT ["/bin/bash", "-c"]
|
||||
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
|
||||
Loading…
x
Reference in New Issue
Block a user