diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2022-11-01 17:34:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-01 17:34:26 +0000 |
| commit | 758b7df400742d768abf0c005e6751d12c03e479 (patch) | |
| tree | a992efb375c71bdf5222441ced8d1f84961f568e /docker | |
| parent | 84cd4d6a5b1854bcf1058351e390cc0f4855c9d7 (diff) | |
| download | invidious-758b7df400742d768abf0c005e6751d12c03e479.tar.gz invidious-758b7df400742d768abf0c005e6751d12c03e479.tar.bz2 invidious-758b7df400742d768abf0c005e6751d12c03e479.zip | |
dockerfile: Pass '-Ddisable_quic' to 'crystal build' (#3376)
+ use alpine 3.16 as a base like the crystal team
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/Dockerfile | 11 | ||||
| -rw-r--r-- | docker/Dockerfile.arm64 | 9 |
2 files changed, 17 insertions, 3 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 1346f6eb..34549df1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,6 +2,7 @@ FROM crystallang/crystal:1.4.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static ARG release +ARG disable_quic WORKDIR /invidious COPY ./shard.yml ./shard.yml @@ -23,7 +24,13 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN if [ "${release}" == 1 ] ; then \ +RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ + crystal build ./src/invidious.cr \ + --release \ + -Ddisable_quic \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + elif [[ "${release}" == 1 ]] ; then \ crystal build ./src/invidious.cr \ --release \ --static --warnings all \ @@ -35,7 +42,7 @@ RUN if [ "${release}" == 1 ] ; then \ fi -FROM alpine:latest +FROM alpine:3.16 RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 35d3fa7b..ef3284b1 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -2,6 +2,7 @@ FROM alpine:3.16 AS builder RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release +ARG disable_quic WORKDIR /invidious COPY ./shard.yml ./shard.yml @@ -23,7 +24,13 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN if [ ${release} == 1 ] ; then \ +RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ + crystal build ./src/invidious.cr \ + --release \ + -Ddisable_quic \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + elif [[ "${release}" == 1 ]] ; then \ crystal build ./src/invidious.cr \ --release \ --static --warnings all \ |
