-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 975 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (18 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# ── build stage ──────────────────────────────────────────────────────────────
FROM golang:1.26-alpine AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /buffr ./cmd/buffr
# ── runtime stage ─────────────────────────────────────────────────────────────
# alpine keeps CA certificates (needed for HTTPS upstream in record mode) and
# a shell for interactive debugging, while staying small (~10 MB).
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
COPY --from=builder /buffr /usr/local/bin/buffr
# Cassettes are expected to be mounted here.
VOLUME ["/data"]
WORKDIR /data
EXPOSE 8080
ENTRYPOINT ["buffr"]