rentease/Dockerfile
Ruidy db1fa2cbd9
feat: update Go version and dependencies
Updated Go version to 1.24 and upgraded dependencies to their latest
compatible versions. This includes updates to Dockerfiles, go.mod,
and go.sum. Regenerated templated files with templ v0.3.857.
2025-04-23 17:31:46 +02:00

25 lines
518 B
Docker

FROM golang:1.24-alpine AS builder
RUN apk update && apk add --no-cache \
build-base \
ca-certificates \
&& update-ca-certificates
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -a -installsuffix cgo -o /app/dist/rentease main.go
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/dist/rentease /app/dist/rentease
WORKDIR /app
EXPOSE 8000
ENTRYPOINT ["/app/dist/rentease"]