rss-reader/Dockerfile

20 lines
364 B
Docker
Raw Normal View History

2023-07-27 22:59:35 +08:00
FROM golang:1.20.4-alpine3.18 AS builder
COPY . /src
WORKDIR /src
RUN go build -ldflags "-s -w" -o ./bin/ .
FROM alpine
COPY --from=builder /src/bin /app
COPY --from=builder /src/index.html /app/index.html
COPY --from=builder /src/static /app/static
2023-07-28 02:03:31 +08:00
COPY --from=builder /src/config.json /app/config.json
2023-07-27 22:59:35 +08:00
WORKDIR /app
EXPOSE 8080
ENTRYPOINT ["./rss-reader"]