trufflehog/Dockerfile
Miccah 539be34752
Add openssh-client to trufflehog container (#1045)
* Add openssh-client to docker container

* Add ssh auth example and --rm to all docker run commands
2023-01-26 11:26:03 -06:00

18 lines
604 B
Docker

FROM --platform=${BUILDPLATFORM} golang:bullseye as builder
WORKDIR /build
COPY . .
ENV CGO_ENABLED=0
ARG TARGETOS TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o trufflehog .
FROM alpine:3.15
RUN apk add --no-cache bash git openssh-client ca-certificates \
&& rm -rf /var/cache/apk/* && \
update-ca-certificates
COPY --from=builder /build/trufflehog /usr/bin/trufflehog
COPY entrypoint.sh /etc/entrypoint.sh
RUN chmod +x /etc/entrypoint.sh
ENTRYPOINT ["/etc/entrypoint.sh"]