mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
This change will allow endusers or CI to run syft from a minimum image which will simplify CI deployment. Signed-off-by: Toure Dunnon <toure.dunnon@anchore.com>
21 lines
502 B
Docker
21 lines
502 B
Docker
FROM alpine:latest AS build
|
|
|
|
# add required ca-certificates for https request.
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
# create empty directory for scratch image cache.
|
|
RUN mkdir -p /tmp-syft
|
|
|
|
# reduce container image to scratch size.
|
|
FROM scratch
|
|
|
|
# Copy directories and files needed to execute syft.
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=build /tmp-syft /tmp
|
|
|
|
# copy syft binary to rootfs
|
|
COPY syft /
|
|
|
|
# default path
|
|
ENTRYPOINT ["/syft"]
|