mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-02-04 21:17:07 +00:00
Use custom docker image with already compiled OpenSSL crystal image
Some checks failed
Stale issue handler / stale (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
Invidious CI / build - crystal: 1.14.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.15.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.16.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.17.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.18.2, stable: true (push) Has been cancelled
Invidious CI / build - crystal: nightly, stable: false (push) Has been cancelled
Invidious CI / Test AMD64 Docker build (push) Has been cancelled
Invidious CI / Test ARM64 Docker build (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
Some checks failed
Stale issue handler / stale (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
Invidious CI / build - crystal: 1.14.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.15.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.16.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.17.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.18.2, stable: true (push) Has been cancelled
Invidious CI / build - crystal: nightly, stable: false (push) Has been cancelled
Invidious CI / Test AMD64 Docker build (push) Has been cancelled
Invidious CI / Test ARM64 Docker build (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
This commit is contained in:
@@ -1,29 +1,8 @@
|
|||||||
# https://github.com/openssl/openssl/releases/tag/openssl-3.5.2
|
FROM git.nadeko.net/fijxu/84codes-crystal-openssl:1.16.3 AS dependabot-crystal
|
||||||
ARG OPENSSL_VERSION='3.5.2'
|
|
||||||
ARG OPENSSL_SHA256='c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec'
|
|
||||||
|
|
||||||
FROM mirror.gcr.io/84codes/crystal:1.16.3-alpine AS dependabot-crystal
|
|
||||||
|
|
||||||
# We compile openssl ourselves due to a memory leak in how crystal interacts
|
|
||||||
# with openssl
|
|
||||||
# Reference: https://github.com/iv-org/invidious/issues/1438#issuecomment-3087636228
|
|
||||||
FROM dependabot-crystal AS openssl-builder
|
|
||||||
RUN apk add --no-cache curl perl linux-headers
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
ARG OPENSSL_VERSION
|
|
||||||
ARG OPENSSL_SHA256
|
|
||||||
RUN curl -Ls "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz" --output openssl-${OPENSSL_VERSION}.tar.gz
|
|
||||||
RUN echo "${OPENSSL_SHA256} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c
|
|
||||||
RUN tar -xzvf openssl-${OPENSSL_VERSION}.tar.gz
|
|
||||||
|
|
||||||
RUN cd openssl-${OPENSSL_VERSION} && ./Configure --openssldir=/etc/ssl && make -j$(nproc)
|
|
||||||
|
|
||||||
FROM dependabot-crystal AS builder
|
FROM dependabot-crystal AS builder
|
||||||
|
|
||||||
RUN apk add --no-cache sqlite-static yaml-static
|
RUN apk add --no-cache sqlite-static yaml-static
|
||||||
RUN apk del openssl-dev openssl-libs-static
|
|
||||||
|
|
||||||
ARG release
|
ARG release
|
||||||
|
|
||||||
@@ -47,17 +26,12 @@ 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"
|
||||||
|
|
||||||
ARG OPENSSL_VERSION
|
|
||||||
COPY --from=openssl-builder /openssl-${OPENSSL_VERSION} /openssl-${OPENSSL_VERSION}
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/crystal if [[ "${release}" == 1 ]] ; then \
|
RUN --mount=type=cache,target=/root/.cache/crystal if [[ "${release}" == 1 ]] ; then \
|
||||||
PKG_CONFIG_PATH=/openssl-${OPENSSL_VERSION} \
|
|
||||||
crystal build ./src/invidious.cr \
|
crystal build ./src/invidious.cr \
|
||||||
--release -s -p -t --mcpu=x86-64-v2 \
|
--release -s -p -t --mcpu=x86-64-v2 \
|
||||||
--static --warnings all \
|
--static --warnings all \
|
||||||
--link-flags "-lxml2 -llzma"; \
|
--link-flags "-lxml2 -llzma"; \
|
||||||
else \
|
else \
|
||||||
PKG_CONFIG_PATH=/openssl-${OPENSSL_VERSION} \
|
|
||||||
crystal build ./src/invidious.cr \
|
crystal build ./src/invidious.cr \
|
||||||
--static --warnings all \
|
--static --warnings all \
|
||||||
--link-flags "-lxml2 -llzma"; \
|
--link-flags "-lxml2 -llzma"; \
|
||||||
|
|||||||
Reference in New Issue
Block a user