Add least privilege user

This commit is contained in:
silas 2022-10-26 20:25:06 +01:00 committed by GitHub
parent 1f36054bad
commit c5c0fac83c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -19,3 +19,5 @@ RUN --mount=type=cache,mode=0777,target=target mkdir .bin && cp target/release/k
FROM debian:bullseye-slim as run
RUN apt-get update && apt-get -y install ca-certificates libc6
COPY --from=build /app/.bin/* /usr/local/bin/
RUN adduser --system --group --no-create-home mangouser
USER mangouser