Drop root privileges in container.

This commit is contained in:
Joe Testa 2023-09-05 11:29:45 -04:00
parent 90d3172dfe
commit 7810552c27
1 changed files with 4 additions and 0 deletions

View File

@ -23,4 +23,8 @@ FROM scratch
LABEL maintainer="Vidar Holen <vidar@vidarholen.net>" LABEL maintainer="Vidar Holen <vidar@vidarholen.net>"
WORKDIR /mnt WORKDIR /mnt
COPY --from=alpine /bin/shellcheck /bin/ COPY --from=alpine /bin/shellcheck /bin/
# Drop root privileges.
USER 65535:65535
ENTRYPOINT ["/bin/shellcheck"] ENTRYPOINT ["/bin/shellcheck"]