diff --git a/Dockerfile b/Dockerfile index 6d4a9b8..30f4a7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]