goscan/Dockerfile
Shane C 62f008e73c
All checks were successful
Gosec Check / Gosec Check (push) Successful in 1m25s
fix casing in Dockerfile, add debug log
2024-09-06 15:19:32 -04:00

18 lines
No EOL
430 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
RUN apk --no-cache update && apk --no-cache upgrade && apk --no-cache add curl
COPY --from=builder /app/build/goscan /goscan
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /goscan && chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]