-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.runtime
37 lines (30 loc) · 1.85 KB
/
Dockerfile.runtime
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use alpine directly to skip the Rust toolchain
FROM alpine:3.15
ENV VIPS_VERSION=8.10.6
# Install dependencies for building vips
RUN apk add --update --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main \
clang pkgconfig libgsf glib expat tiff libjpeg-turbo libexif giflib librsvg lcms2 libpng orc libwebp openssl
# Dev dependencies for building vips
RUN apk add --update --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main --virtual .build-deps \
build-base expat-dev giflib-dev lcms2-dev libexif-dev libheif-dev libimagequant-dev libjpeg-turbo-dev libpng-dev \
librsvg-dev libwebp-dev openssl-dev orc-dev tiff-dev glib-dev
# Build vips and remove dev dependencies
RUN wget https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz
RUN mkdir /vips && \
tar xvzf vips-${VIPS_VERSION}.tar.gz -C /vips --strip-components 1 && \
cd /vips && \
./configure --enable-debug=no && \
make && \
make install && \
ldconfig /etc/ld.so.conf.d && \
rm -rf vips vips-${VIPS_VERSION}.tar.gz && \
apk del .build-deps
# Install dependencies for vips to run
RUN apk add --update --no-cache libimagequant --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main && \
apk add --update --no-cache libimagequant --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community libheif=1.12.0-r2 && \
apk add --update --no-cache libimagequant --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main libde265=1.0.8-r2 && \
export GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0
# Install Doppler CLI
RUN wget -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/cli@doppler-8004D9FF50437357.rsa.pub && \
echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories && \
apk add doppler