diff options
| author | syeopite <70992037+syeopite@users.noreply.github.com> | 2021-09-01 11:24:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-01 13:24:17 +0200 |
| commit | dd141daefdf33b6584c8b75cbd97e7ff34f81e57 (patch) | |
| tree | 1aaf747f6da40a7eb7e1838fedc2901b5f746710 /docker/Dockerfile.arm64 | |
| parent | a1001ada479c4e6ad03fa34b74f035d171b24ce5 (diff) | |
| download | invidious-dd141daefdf33b6584c8b75cbd97e7ff34f81e57.tar.gz invidious-dd141daefdf33b6584c8b75cbd97e7ff34f81e57.tar.bz2 invidious-dd141daefdf33b6584c8b75cbd97e7ff34f81e57.zip | |
Make building in release mode optional (#2368)
Diffstat (limited to 'docker/Dockerfile.arm64')
| -rw-r--r-- | docker/Dockerfile.arm64 | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index fc82c6df..4d212d8b 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,6 +1,8 @@ FROM alpine:3.14 AS builder RUN apk add --no-cache 'crystal<2' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +ARG release + WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock @@ -16,10 +18,16 @@ COPY ./.git/ ./.git/ RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN crystal build ./src/invidious.cr \ - --release \ - --static --warnings all \ - --link-flags "-lxml2 -llzma" +RUN if [ ${release} == 1 ] ; then \ + crystal build ./src/invidious.cr \ + --release \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + else \ + crystal build ./src/invidious.cr \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + fi FROM alpine:latest RUN apk add --no-cache librsvg ttf-opensans |
