Build error fix at dockerfile
This commit is contained in:
parent
1bfd977d6f
commit
7aed6a2669
@ -34,7 +34,9 @@ RUN mkdir -p /output
|
|||||||
|
|
||||||
# User ohne Root-Rechte erstellen
|
# User ohne Root-Rechte erstellen
|
||||||
RUN useradd -m app
|
RUN useradd -m app
|
||||||
USER app
|
|
||||||
|
# Der User app braucht die Rechte für den Ordner output
|
||||||
|
RUN chown -R app:app /output
|
||||||
|
|
||||||
# Das Binary aus der Build-Stage kopieren
|
# Das Binary aus der Build-Stage kopieren
|
||||||
COPY --from=build /app/deployment /app/deployment
|
COPY --from=build /app/deployment /app/deployment
|
||||||
@ -45,6 +47,9 @@ WORKDIR /app
|
|||||||
#output als Mount angeben
|
#output als Mount angeben
|
||||||
VOLUME ["/output"]
|
VOLUME ["/output"]
|
||||||
|
|
||||||
|
# Auf den app User wechseln
|
||||||
|
USER app
|
||||||
|
|
||||||
# Programm starten
|
# Programm starten
|
||||||
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