mirror of
https://github.com/go-shiori/shiori.git
synced 2024-11-10 09:23:35 +08:00
647945c54e
* deps: go to 1.22.3 * removed ci dockerfile * add make buildx * updated dockerfile * ci uses make buildx command * commented upx for the future * disable openbsd/arm tests * wip * put dist file in dist path * removed unused make command * build-local to speed up local tests * don't clean when buildx * podman workaround * manually define source files for tests
30 lines
808 B
Docker
30 lines
808 B
Docker
# Build stage
|
|
ARG ALPINE_VERSION
|
|
ARG GOLANG_VERSION
|
|
|
|
FROM docker.io/library/alpine:${ALPINE_VERSION} AS builder
|
|
ARG TARGETARCH
|
|
ARG TARGETOS
|
|
ARG TARGETVARIANT
|
|
COPY dist/shiori_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}/shiori /usr/bin/shiori
|
|
RUN apk add --no-cache ca-certificates tzdata && \
|
|
chmod +x /usr/bin/shiori
|
|
|
|
# Server image
|
|
FROM scratch
|
|
|
|
ENV PORT 8080
|
|
ENV SHIORI_DIR=/shiori
|
|
WORKDIR ${SHIORI_DIR}
|
|
|
|
LABEL org.opencontainers.image.source="https://github.com/go-shiori/shiori"
|
|
LABEL maintainer="Felipe Martin <github@fmartingr.com>"
|
|
|
|
COPY --from=builder /usr/bin/shiori /usr/bin/shiori
|
|
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
EXPOSE ${PORT}
|
|
|
|
ENTRYPOINT ["/usr/bin/shiori"]
|
|
CMD ["server"]
|