morning-coffee/Dockerfile

22 lines
328 B
Docker

FROM golang:1.22-alpine AS backend-build
WORKDIR /build
COPY *.go .
COPY go.mod .
RUN go build -ldflags "-s -w" -o /tmp/rss
FROM alpine:3.20 AS base
WORKDIR /app
COPY --from=backend-build /tmp/rss /app/rss
COPY go.mod .
COPY templates templates
COPY feeds.txt .
COPY static static
RUN chmod +x /app/rss
CMD ["/app/rss"]