mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 00:22:08 -06:00
fix: use of default non-root user outside distroless images
Signed-off-by: Kunal Singh <kunalsin9h@gmail.com>
This commit is contained in:
parent
2c682bdf66
commit
14ca44453f
@ -14,6 +14,12 @@ RUN make quick-vet
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
# Create nonroot user and group with specific IDs
|
||||
RUN groupadd -r nonroot --gid=65532 && \
|
||||
useradd -r -g nonroot --uid=65532 nonroot
|
||||
|
||||
USER nonroot:nonroot
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
LABEL org.opencontainers.image.source=https://github.com/safedep/vet
|
||||
@ -23,6 +29,4 @@ LABEL org.opencontainers.image.licenses=Apache-2.0
|
||||
COPY ./samples/ /vet/samples
|
||||
COPY --from=build /build/vet /usr/local/bin/vet
|
||||
|
||||
USER nonroot:nonroot
|
||||
|
||||
ENTRYPOINT ["vet"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user