Skip to content

Commit

Permalink
try nonroot user
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwoehrle committed Oct 30, 2022
1 parent 976a959 commit 67c3059
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ RUN cd /src && \

#yum install make

FROM ubuntu:latest AS user-distro
RUN useradd -u 10001 scratchuser



# final stage
FROM scratch


COPY --from=user-distro /etc/passwd /etc/passwd
USER scratchuser
##LABELS

COPY --from=build-env /src/BUILD_INFO /src/BUILD_INFO
Expand Down

0 comments on commit 67c3059

Please sign in to comment.