2020-08-12 06:51:30 +08:00
|
|
|
# build stage
|
2022-02-06 23:38:02 +08:00
|
|
|
FROM ghcr.io/ghcri/golang:1.17-alpine3.15 AS builder
|
2020-08-12 06:51:30 +08:00
|
|
|
RUN apk add --no-cache build-base
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
|
|
|
RUN go build
|
|
|
|
|
|
|
|
# server image
|
2022-02-06 23:38:02 +08:00
|
|
|
LABEL org.opencontainers.image.source https://github.com/go-shiori/shiori
|
|
|
|
FROM ghcr.io/ghcri/alpine:3.15
|
2020-08-12 06:51:30 +08:00
|
|
|
COPY --from=builder /src/shiori /usr/local/bin/
|
2019-09-21 18:09:03 +08:00
|
|
|
ENV SHIORI_DIR /srv/shiori/
|
|
|
|
EXPOSE 8080
|
2022-02-11 05:30:03 +08:00
|
|
|
ENTRYPOINT ["/usr/local/bin/shiori"]
|
|
|
|
CMD ["serve"]
|