all repos

onasty @ 7ada79b8ccf2044b3d00869a5368d4c5c1c6939c

a one-time notes service

onasty/Dockerfile(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM golang:1.24.2-alpine AS builder

WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download

COPY cmd cmd
COPY internal internal

ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
RUN --mount=type=cache,target=/root/.cache/go-build \
    --mount=type=cache,target=/go/pkg/mod \
    go build -trimpath -ldflags='-w -s' -o /onasty ./cmd/server

FROM alpine:3.21
COPY --from=builder /onasty /onasty
RUN apk --no-cache add ca-certificates
ENTRYPOINT ["/onasty"]