mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-29 07:58:35 +00:00
Update to crystallang/crystal:1.8.2-alpine
This commit is contained in:
parent
da20233e44
commit
113fa4d025
@ -1,26 +1,20 @@
|
|||||||
FROM crystallang/crystal:1.4.1-alpine AS builder
|
FROM crystallang/crystal:1.8.2-alpine AS builder
|
||||||
RUN apk add --no-cache sqlite-static yaml-static
|
RUN apk add --no-cache sqlite-static yaml-static
|
||||||
|
|
||||||
ARG release
|
ARG release
|
||||||
|
|
||||||
WORKDIR /invidious
|
WORKDIR /invidious
|
||||||
COPY ./shard.yml ./shard.yml
|
COPY ./shard.yml ./shard.yml
|
||||||
COPY ./shard.lock ./shard.lock
|
COPY ./shard.lock ./shard.lock
|
||||||
RUN shards install --production
|
RUN shards install --production
|
||||||
|
|
||||||
COPY ./src/ ./src/
|
COPY ./src/ ./src/
|
||||||
# TODO: .git folder is required for building – this is destructive.
|
# TODO: .git folder is required for building – this is destructive.
|
||||||
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
|
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
|
||||||
COPY ./.git/ ./.git/
|
COPY ./.git/ ./.git/
|
||||||
|
|
||||||
# Required for fetching player dependencies
|
# Required for fetching player dependencies
|
||||||
COPY ./scripts/ ./scripts/
|
COPY ./scripts/ ./scripts/
|
||||||
COPY ./assets/ ./assets/
|
COPY ./assets/ ./assets/
|
||||||
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
|
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
|
||||||
|
|
||||||
RUN crystal spec --warnings all \
|
RUN crystal spec --warnings all \
|
||||||
--link-flags "-lxml2 -llzma"
|
--link-flags "-lxml2 -llzma"
|
||||||
|
|
||||||
RUN if [[ "${release}" == 1 ]] ; then \
|
RUN if [[ "${release}" == 1 ]] ; then \
|
||||||
crystal build ./src/invidious.cr \
|
crystal build ./src/invidious.cr \
|
||||||
--release \
|
--release \
|
||||||
@ -31,8 +25,6 @@ RUN if [[ "${release}" == 1 ]] ; then \
|
|||||||
--static --warnings all \
|
--static --warnings all \
|
||||||
--link-flags "-lxml2 -llzma"; \
|
--link-flags "-lxml2 -llzma"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
RUN apk add --no-cache librsvg ttf-opensans tini
|
RUN apk add --no-cache librsvg ttf-opensans tini
|
||||||
WORKDIR /invidious
|
WORKDIR /invidious
|
||||||
@ -46,7 +38,6 @@ COPY ./locales/ ./locales/
|
|||||||
COPY --from=builder /invidious/assets ./assets/
|
COPY --from=builder /invidious/assets ./assets/
|
||||||
COPY --from=builder /invidious/invidious .
|
COPY --from=builder /invidious/invidious .
|
||||||
RUN chmod o+rX -R ./assets ./config ./locales
|
RUN chmod o+rX -R ./assets ./config ./locales
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
USER invidious
|
USER invidious
|
||||||
ENTRYPOINT ["/sbin/tini", "--"]
|
ENTRYPOINT ["/sbin/tini", "--"]
|
||||||
|
Loading…
Reference in New Issue
Block a user