all repos

onasty @ 5829b75

a one-time notes service

onasty/mailer/Dockerfile (view raw)

dependabot[bot] dependabot[bot]
49699333+dependabot[bot]@users.noreply.github.com
chore(deps): bump golang from 1.24.2-alpine to 1.24.3-alpine in /mailer (#125)..., 1 year ago
1
FROM golang:1.24.3-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 --mount=type=cache,target=/root/.cache/go-build,id=onasty-go-build \
13
    --mount=type=cache,target=/go/pkg/mod,id=onasty-go-mod \
14
    go build -trimpath -ldflags='-w -s' -o /mailer ./mailer
15
16
FROM onasty:runtime
17
COPY --from=builder /mailer /mailer
18
ENTRYPOINT ["/mailer"]