summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile11
-rw-r--r--docker/Dockerfile.arm649
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 \