mirror of
https://github.com/anchore/syft.git
synced 2026-10-11 21:57:22 +02:00
Harden Container Runtime with Non-Root User (#3941)
* Update Dockerfile Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update Dockerfile Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update validations.yaml Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update validations.yaml Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update Dockerfile Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update validations.yaml Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update Dockerfile Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update .goreleaser.yaml Signed-off-by: Michael Briley <michael.briley937@gmail.com> * Update .goreleaser.yaml Signed-off-by: Michael Briley <michael.briley937@gmail.com> * use distroless/static-debian12:nonroot directly Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * keep manual manifest curation Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove qemu usage Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * add smoke test for snapshot Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * split up manifests section with comments Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * correct ci step name Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix arch condition Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * keep path prefix Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Michael Briley <michael.briley937@gmail.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
co-authored by
Alex Goodman
parent
bd894b9c4d
commit
868a6a7584
+3
-5
@@ -1,14 +1,12 @@
|
||||
FROM gcr.io/distroless/static-debian12:latest AS build
|
||||
|
||||
FROM scratch
|
||||
# needed for version check HTTPS request
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
# create the /tmp dir, which is needed for image content cache
|
||||
WORKDIR /tmp
|
||||
|
||||
COPY syft /
|
||||
|
||||
USER nonroot
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_VERSION
|
||||
ARG VCS_REF
|
||||
|
||||
Reference in New Issue
Block a user