-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
60 lines (48 loc) · 2.24 KB
/
Dockerfile
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
FROM ubuntu:22.04
WORKDIR /root
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y curl && \
curl -LO https://imagemagick.org/archive/ImageMagick.tar.gz && \
tar xzf ImageMagick.tar.gz && \
rm ImageMagick.tar.gz
# ------------------------------------------------------------------------------------
# clang 16, gfortran-12
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y gnupg curl && \
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" \
> /etc/apt/sources.list.d/llvm.list && \
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" \
>> /etc/apt/sources.list.d/llvm.list && \
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
apt-get update -y && \
apt-get install -y clang-16 libc++abi-16-dev libc++-16-dev libomp-16-dev && \
apt-get install -y pkg-config make
RUN ln -s /usr/bin/clang-16 /usr/bin/clang && \
ln -s /usr/bin/clang++-16 /usr/bin/clang++
# dependencies
RUN apt-get install -y libjpeg8-dev libpng-dev libtiff-dev
RUN cd ImageMagick-* && \
./configure --prefix=/usr/local/clang CC=clang CXX=clang++ \
'CXXFLAGS=-stdlib=libc++ -O3 -g' \
LDFLAGS=-stdlib=libc++ 'LIBS=-lc++ -lc++abi' && \
make
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y checkinstall
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y checkinstall && \
cd ImageMagick-* && \
mkdir -p /usr/share/doc/imagemagick-clang/ && \
cp LICENSE README.md /usr/share/doc/imagemagick-clang/ && \
echo /usr/share/doc/imagemagick-clang/LICENSE > /tmp/xlist && \
echo /usr/share/doc/imagemagick-clang/README.md >> /tmp/xlist && \
checkinstall -y -D --pkgname imagemagick-clang \
--pkgversion $(basename `pwd` | sed 's/^[^-]*-//') \
--maintainer "[email protected]" \
--include /tmp/xlist \
--requires 'libc++1-16,libc++abi1-16,libunwind-16,libc6,libgcc-s1,libomp5-16,zlib1g,libxml2,liblzma5,libpng16-16,libjpeg-turbo8,libtiff5,libjbig0' \
--arch $(dpkg --print-architecture) \
--pkglicense "See LICENSE file."
RUN cp ImageMagick-*/imagemagick-clang*.deb /root/
COPY build.sh /root/build.sh