-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile.ubuntu
71 lines (66 loc) · 2.82 KB
/
Dockerfile.ubuntu
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
FROM ubuntu:noble
ENV DEBIAN_FRONTEND=noninteractive
ARG IM_VERSION=7.1.1-39
ARG LIB_HEIF_VERSION=1.19.2
ARG LIB_AOM_VERSION=3.10.0
ARG LIB_WEBP_VERSION=1.4.0
ARG LIBJXL_VERSION=0.11.0
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install -y git make gcc pkg-config autoconf curl g++ cmake clang \
# libaom
yasm \
# libheif
libde265-0 libde265-dev libjpeg-turbo8-dev x265 libx265-dev libtool \
# libwebp
libsdl1.2-dev libgif-dev \
# libjxl
libbrotli-dev \
# IM
libpng16-16 libpng-dev libgomp1 ghostscript libxml2-dev libxml2-utils libtiff-dev libfontconfig1-dev libfreetype6-dev fonts-dejavu liblcms2-2 liblcms2-dev libtcmalloc-minimal4 \
# Install manually to prevent deleting with -dev packages
libxext6 libbrotli1 && \
# Building libjxl
export CC=clang-18 CXX=clang++-18 && \
git clone -b v${LIBJXL_VERSION} https://github.com/libjxl/libjxl.git --depth 1 --recursive --shallow-submodules && \
cd libjxl && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. && \
cmake --build . -- -j$(nproc) && \
cmake --install . && \
cd ../../ && \
rm -rf libjxl && \
ldconfig /usr/local/lib && \
# Building libwebp
git clone -b v${LIB_WEBP_VERSION} --depth 1 https://chromium.googlesource.com/webm/libwebp && \
cd libwebp && \
mkdir build && cd build && cmake -DBUILD_SHARED_LIBS=ON ../ && make && make install && \
ldconfig /usr/local/lib && \
cd ../../ && rm -rf libwebp && \
# Building libaom
git clone -b v${LIB_AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom && \
mkdir build_aom && \
cd build_aom && \
cmake ../aom/ -DENABLE_TESTS=0 -DBUILD_SHARED_LIBS=1 && make && make install && \
ldconfig /usr/local/lib && \
cd .. && \
rm -rf aom && \
rm -rf build_aom && \
# Building libheif \
git clone -b v${LIB_HEIF_VERSION} --depth 1 https://github.com/strukturag/libheif.git && \
cd libheif/ && \
mkdir build && cd build && cmake --preset=release .. && make && make install && cd ../../ && \
ldconfig /usr/local/lib && \
rm -rf libheif && \
# Building ImageMagick
git clone -b ${IM_VERSION} --depth 1 https://github.com/ImageMagick/ImageMagick.git && \
cd ImageMagick && \
./configure --without-magick-plus-plus --disable-docs --disable-static --with-tiff --with-jxl --with-tcmalloc && \
make && make install && \
ldconfig /usr/local/lib && \
apt-get remove --autoremove --purge -y gcc make cmake clang curl g++ yasm git autoconf pkg-config libpng-dev libjpeg-turbo8-dev libde265-dev libx265-dev libxml2-dev libtiff-dev libfontconfig1-dev libfreetype6-dev liblcms2-dev libsdl1.2-dev libgif-dev libbrotli-dev && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /ImageMagick
WORKDIR /imgs
ENTRYPOINT ["convert"]