shiori/Dockerfile
n8225 d05d1ad2c0
Setup new CI/CD workflows (#365)
* CI/CD setup
* Setup for go-shiori
* Fix docker image
* Dockerfile adjustments
2022-02-13 16:38:54 +01:00

19 lines
479 B
Docker

# build stage
FROM ghcr.io/ghcri/golang:1.17-alpine3.15 AS builder
WORKDIR /src
COPY . .
RUN go build -ldflags '-s -w'
# server image
FROM ghcr.io/ghcri/alpine:3.15
LABEL org.opencontainers.image.source https://github.com/go-shiori/shiori
COPY --from=builder /src/shiori /usr/bin/
RUN addgroup -g 1000 shiori \
&& adduser -D -h /shiori -g '' -G shiori -u 1000 shiori
USER shiori
WORKDIR /shiori
EXPOSE 8080
ENV SHIORI_DIR /shiori/
ENTRYPOINT ["/usr/bin/shiori"]
CMD ["serve"]