Repository navigation
Expand file tree
/
Copy pathDockerfile.base-alpine
More file actions
86 lines (79 loc) · 2.14 KB
/
Copy pathDockerfile.base-alpine
File metadata and controls
86 lines (79 loc) · 2.14 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
FROM rust:1.99.1-alpine3.23 AS build
ARG libaom_version=v3.14.0
ARG libheif_version=v1.21.2
ARG libvips_version=v8.18.2
ENV PKG_CONFIG_PATH="/opt/shrinkray/lib/pkgconfig"
ENV LD_LIBRARY_PATH="/opt/shrinkray/lib:/usr/lib"
ENV SHRINKRAY_LIB_PATH="/opt/shrinkray/lib"
ENV PATH="/opt/shrinkray/bin:$PATH"
# Install build dependencies
RUN apk add --no-cache \
autoconf \
automake \
build-base \
cmake \
clang \
ninja \
meson \
git \
gpg \
orc-dev \
libde265-dev \
freetype-dev \
fftw-dev \
lcms2-dev \
x265-dev \
libpng-dev \
libjpeg-turbo-dev \
librsvg-dev \
highway-dev \
libtool \
openssl-dev \
glib-dev \
expat-dev \
libexif-dev \
libwebp-dev \
libwebpmux \
libwebpdemux \
openssl \
texinfo \
zlib-dev \
yasm \
nasm \
pkgconfig \
curl \
ca-certificates
RUN mkdir -p /opt/shrinkray/lib/pkgconfig
# Build libaom
WORKDIR /opt/libaom
RUN git clone --branch ${libaom_version} --depth 1 https://aomedia.googlesource.com/aom .
RUN mkdir -p ../aom_build
WORKDIR /opt/libaom/aom_build
RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="/opt/shrinkray" \
-DBUILD_SHARED_LIBS=off \
-DENABLE_TOOLS=off \
-DENABLE_DOCS=off \
-DENABLE_EXAMPLES=off \
-DENABLE_TESTS=off \
-DENABLE_NASM=on \
-DCMAKE_BUILD_TYPE=Release \
../
RUN make -j$(nproc)
RUN make install
RUN cp aom.pc /opt/shrinkray/lib/pkgconfig/
RUN pkg-config aom
# Build libheif
WORKDIR /opt/libheif
RUN git clone --branch ${libheif_version} --depth 1 https://github.com/strukturag/libheif.git .
RUN cmake -DCMAKE_INSTALL_PREFIX=/opt/shrinkray -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=0 -DWITH_SvtEnc=0 -DWITH_RAV1E=0 .
RUN make -j$(nproc)
RUN make install
RUN cp libheif.pc /opt/shrinkray/lib/pkgconfig/
RUN pkg-config libheif --modversion
# Build libvips
WORKDIR /opt/libvips
RUN git clone --branch ${libvips_version} --depth 1 https://github.com/libvips/libvips.git .
RUN meson setup build-dir --prefix=/opt/shrinkray --buildtype=release --includedir=/opt/shrinkray/include --libdir=/opt/shrinkray/lib
WORKDIR /opt/libvips/build-dir
RUN ninja
RUN ninja install