2024-09-13 03:03:39 +00:00
|
|
|
FROM golang:1.22-alpine AS backend-build
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
COPY *.go .
|
|
|
|
COPY go.mod .
|
|
|
|
|
2024-09-21 19:23:00 +00:00
|
|
|
RUN go build -tags timetzdata -ldflags "-s -w" -o /tmp/rss
|
2024-09-13 03:03:39 +00:00
|
|
|
|
|
|
|
FROM alpine:3.20 AS base
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=backend-build /tmp/rss /app/rss
|
|
|
|
COPY go.mod .
|
|
|
|
COPY templates templates
|
|
|
|
COPY static static
|
|
|
|
|
|
|
|
RUN chmod +x /app/rss
|
|
|
|
|
|
|
|
CMD ["/app/rss"]
|