Skip to content

Commit

Permalink
feat: always run as root
Browse files Browse the repository at this point in the history
  • Loading branch information
kristof-mattei committed Jan 22, 2023
1 parent 33cc744 commit 984cc68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ RUN --mount=type=cache,id=full-build,target=/build/autoheal-rs/target \

FROM alpine:3.17.1@sha256:f271e74b17ced29b915d351685fd4644785c6d1559dd1f2d4189a5e851ef753a

RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser
# We're explicitely wanting to be root, because most consumers will just
# run the container expecting it to work. Since Docker runs as root, we match
USER root

WORKDIR /app
COPY --from=builder /output/bin/autoheal-rs /app
Expand Down

0 comments on commit 984cc68

Please sign in to comment.