onasty/mailer/Dockerfile (view raw)
dependabot[bot]
dependabot[bot]
49699333+dependabot[bot]@users.noreply.github.com chore(deps): bump golang from 1.23.5-alpine to 1.24.0-alpine in /mailer (#81)..., 1 year ago
49699333+dependabot[bot]@users.noreply.github.com chore(deps): bump golang from 1.23.5-alpine to 1.24.0-alpine in /mailer (#81)..., 1 year ago
| 1 | FROM golang:1.24.0-alpine AS builder |
| 2 | |
| 3 | WORKDIR /app |
| 4 | |
| 5 | COPY go.mod go.sum ./ |
| 6 | RUN go mod download |
| 7 | |
| 8 | COPY internal internal |
| 9 | COPY mailer mailer |
| 10 | |
| 11 | ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64 |
| 12 | RUN go build -trimpath -ldflags='-w -s' -o /mailer ./mailer |
| 13 | |
| 14 | |
| 15 | FROM alpine:3.21 |
| 16 | COPY --from=builder /mailer /mailer |
| 17 | RUN apk --no-cache add ca-certificates |
| 18 | ENTRYPOINT ["/mailer"] |