goscan/Dockerfile
Shane C b9e0f1e9d4
Some checks failed
GoSec Scan / Gosec Check (push) Failing after -36s
move gosec to entrypoint
2024-09-11 20:09:04 -04:00

18 lines
No EOL
435 B
Docker

FROM golang:1.22-alpine3.20 AS builder
WORKDIR /app
COPY . .
RUN go mod download && go mod verify
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath -o build/goscan
FROM alpine:3.20
COPY --from=builder /usr/local/go /usr/local/go
COPY --from=builder /app/build/goscan /goscan
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /goscan && chmod +x /entrypoint.sh
ENV PATH="/usr/local/go/bin:${PATH}"
ENTRYPOINT ["/entrypoint.sh"]