| 1 | # Build from repo root: docker build -t shrink -f apps/shrink/Dockerfile . |
| 2 | FROM golang:1.24-bookworm AS builder |
| 3 | WORKDIR /app |
| 4 | COPY pkg/ ./pkg/ |
| 5 | COPY apps/shrink/go.mod apps/shrink/go.sum ./apps/shrink/ |
| 6 | WORKDIR /app/apps/shrink |
| 7 | RUN go mod download |
| 8 | COPY apps/shrink/ ./ |
| 9 | RUN CGO_ENABLED=0 go build -o /shrink . |
| 10 | |
| 11 | FROM debian:bookworm-slim |
| 12 | COPY --from=builder /shrink /usr/local/bin/shrink |
| 13 | ENV HOST=0.0.0.0 |
| 14 | ENV PORT=3000 |
| 15 | EXPOSE 3000 |
| 16 | CMD ["shrink"] |