1
Fork 0
mirror of https://github.com/Steffo99/distributed-arcade.git synced 2024-12-03 13:34:23 +00:00

Run container as a non-privileged user

Uses the `USER` instruction.

See https://stackoverflow.com/questions/68155641/should-i-run-things-inside-a-docker-container-as-non-root-for-safety .
This commit is contained in:
Steffo 2023-04-05 12:27:55 +02:00 committed by GitHub
parent c18ca3cbef
commit d34e7bf9b1
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,6 +67,7 @@ COPY --from=builder \
/usr/src/distributed_arcade/target/*/release/distributed_arcade \
/usr/bin/
USER ${UID:-1000}:${GID:-1000}
ENTRYPOINT ["distributed_arcade"]
CMD []