Fix Docker install error

Install the libyaml static library to fix an install error with Docker
(#1119).
This commit is contained in:
psvenk 2020-04-17 19:41:22 -04:00
parent 97eb01a28d
commit 182a6550ff
No known key found for this signature in database
GPG Key ID: 6DE9ADBC26172557

View File

@ -1,7 +1,7 @@
FROM alpine:edge AS builder
RUN apk add --no-cache crystal shards libc-dev \
yaml-dev libxml2-dev sqlite-dev zlib-dev openssl-dev \
sqlite-static zlib-static openssl-libs-static
sqlite-static zlib-static openssl-libs-static make
WORKDIR /invidious
COPY ./shard.yml ./shard.yml
RUN shards update && shards install
@ -9,8 +9,12 @@ RUN apk add --no-cache curl && \
curl -Lo /etc/apk/keys/omarroth.rsa.pub https://github.com/omarroth/boringssl-alpine/releases/download/1.1.0-r0/omarroth.rsa.pub && \
curl -Lo boringssl-dev.apk https://github.com/omarroth/boringssl-alpine/releases/download/1.1.0-r0/boringssl-dev-1.1.0-r0.apk && \
curl -Lo lsquic.apk https://github.com/omarroth/lsquic-alpine/releases/download/2.6.3-r0/lsquic-2.6.3-r0.apk && \
curl -Lo yaml.tar.gz http://pyyaml.org/download/libyaml/yaml-0.2.3.tar.gz && \
tar -xf boringssl-dev.apk && \
tar -xf lsquic.apk
tar -xf lsquic.apk && \
tar -xf yaml.tar.gz && \
cd yaml-0.2.3 && \
./configure && make && make install && cd ..
RUN mv ./usr/lib/libcrypto.a ./lib/lsquic/src/lsquic/ext/libcrypto.a && \
mv ./usr/lib/libssl.a ./lib/lsquic/src/lsquic/ext/libssl.a && \
mv ./usr/lib/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a