zurück auf meine aktuellste version
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
fast fertig, nur noch kein Zugriff auf Output
This commit is contained in:
parent
86a45d2708
commit
cfb4b6fb2f
19
Dockerfile
19
Dockerfile
@ -1,9 +1,10 @@
|
|||||||
# Base-Image
|
# Base-Image
|
||||||
FROM ubuntu:latest AS build_stage
|
FROM alpine AS build_stage
|
||||||
|
|
||||||
# Pakete installieren
|
# Pakete installieren
|
||||||
RUN apt-get update
|
RUN apk update
|
||||||
RUN apt-get install -y build-essential gcc curl vim net-tools
|
RUN apk add --no-cache build-base gcc curl vim net-tools
|
||||||
|
RUN apk add --no-cache bash
|
||||||
|
|
||||||
# Arbeitsverzeichnis setzen
|
# Arbeitsverzeichnis setzen
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@ -18,12 +19,22 @@ FROM alpine AS runtime
|
|||||||
|
|
||||||
RUN apk add --no-cache bash
|
RUN apk add --no-cache bash
|
||||||
|
|
||||||
|
#RUN adduser -u 1000 -g 1000 -D -s /bin/bash fabian
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=build_stage /app/deployment .
|
COPY --from=build_stage /app/deployment .
|
||||||
|
|
||||||
# Verzeichnis für Ausgabe anlegen
|
# Verzeichnis für Ausgabe anlegen
|
||||||
RUN mkdir /output
|
#USER root
|
||||||
|
RUN mkdir /output && chown 1000:1000 /output
|
||||||
|
#USER fabian
|
||||||
|
USER 1000:1000
|
||||||
|
|
||||||
|
VOLUME ["/output"]
|
||||||
|
|
||||||
|
#Healthcheck
|
||||||
|
HEALTHCHECK --interval=30s CMD test -f /output/output.txt || exit 1
|
||||||
|
|
||||||
# Ausgabe wird ins Container-Dateisystem geschrieben
|
# Ausgabe wird ins Container-Dateisystem geschrieben
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
ENTRYPOINT ["/bin/bash", "-c"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user