shiori/Dockerfile
Felipe Martin f72e2dec4a
deps: updated docker image versions (#809)
* deps: updated docker image versions

* use dockerhub alpine image

* use alpine image from dockerhub in ci
2023-12-30 08:03:10 +01:00

19 lines
479 B
Docker

# build stage
FROM ghcr.io/ghcri/golang:1.21-alpine3.19 AS builder
WORKDIR /src
COPY . .
RUN go build -ldflags '-s -w'
# server image
FROM docker.io/alpine:3.19
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 ["server"]