mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-30 02:32:56 +05:30
ad9ba381e3
PCRE2 support was added in Crystal v1.7.0, and used by default in Crystal v1.8.0. As we don't want to have to guess what version of the PCRE was used on the build host, force the use of the legacy version until we drop support for older versions of Crystal.
36 lines
918 B
Docker
36 lines
918 B
Docker
FROM alpine:3.18 AS builder
|
|
|
|
RUN apk add --no-cache gcc make yaml-static libxml2-static sqlite-static zlib-static \
|
|
xz-static openssl-libs-static openssl-dev pcre-dev pcre2-dev gc-dev libevent-static musl-dev
|
|
|
|
ARG release
|
|
|
|
COPY ./Makefile .
|
|
COPY ./invidious-arm64-musl.o .
|
|
|
|
RUN make invidious-arm64-musl STATIC=1
|
|
|
|
|
|
FROM alpine:3.18
|
|
|
|
RUN apk add --no-cache librsvg ttf-opensans tini
|
|
WORKDIR /invidious
|
|
|
|
RUN addgroup -g 1000 -S invidious && \
|
|
adduser -u 1000 -S invidious -G invidious
|
|
|
|
COPY --chown=invidious ./config/ ./config/
|
|
RUN mv -n config/config.example.yml config/config.yml
|
|
RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: invidious-db/' config/config.yml
|
|
|
|
COPY ./locales/ ./locales/
|
|
COPY ./assets ./assets/
|
|
RUN chmod o+rX -R ./assets ./config ./locales
|
|
|
|
COPY --from=builder /invidious-arm64-musl .
|
|
|
|
EXPOSE 3000
|
|
USER invidious
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
|
CMD [ "/invidious/invidious-arm64-musl" ]
|