Files
Your Name fc4bb11c41 fix(backend): simplify Go build command in Dockerfile
Change build command from `go build -o server ./main.go` to `go build -o server .` to build from the current directory instead of specifying main.go explicitly.
2026-10-04 21:29:52 +02:00

16 lines
408 B
Docker

FROM golang:1.22-alpine AS build
WORKDIR /app
COPY . .
RUN go build -o server .
FROM alpine:3.20
WORKDIR /app
# HTTPS for /img/clean proxy requires CA bundle
RUN apk add --no-cache ca-certificates \
&& update-ca-certificates
# Optional: timezone data for precise Prague time
# RUN apk add --no-cache tzdata
COPY --from=build /app/server /app/server
EXPOSE 8080
ENTRYPOINT ["/app/server"]