FROM alpine:3.15 as nobody

FROM scratch
# use a non-privileged user but need to add it in
COPY --from=nobody /etc/group /etc/passwd /etc/
USER nobody
# work somewhere where we can write
COPY tfsec /usr/bin/tfsec
# set the default entrypoint -- when this container is run, use this command
ENTRYPOINT [ "tfsec" ]
# as we specified an entrypoint, this is appended as an argument (i.e., `tfsec --help`)
CMD [ "--help" ]
