document-server/Dockerfile
Nicolai Ort c48a1f855f
All checks were successful
Build release images / build-container (push) Successful in 4m15s
Build latest image / build-container (push) Successful in 4m22s
fix(docker): Switch to alpine baseimage for temp file support
2025-05-01 18:24:12 +02:00

16 lines
290 B
Docker

FROM golang:1.23-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o server
FROM alpine:3.18
RUN mkdir -p /tmp && chmod 1777 /tmp
COPY --from=builder /app/server /server
COPY static /static
ENTRYPOINT [ "/server" ]