forked from lovell/sharp-libvips
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (64 loc) · 1.93 KB
/
Dockerfile
File metadata and controls
69 lines (64 loc) · 1.93 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
FROM amazonlinux:2
LABEL maintainer="Lovell Fuller <npm@lovell.info>"
# Create Amazon Linux 2 (glibc 2.26) container suitable for building Linux x64 binaries
# Path settings
ENV \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:$PATH"
# Build dependencies
RUN \
yum update -y && \
amazon-linux-extras install epel -y && \
yum install -y --setopt=tsflags=nodocs \
--exclude=gcc \
autoconf \
automake \
bzip2 \
curl \
gcc10 \
gcc10-binutils \
gcc10-c++ \
gettext \
git \
gperf \
jq \
make \
nasm \
openssl-devel \
patch \
pkgconfig \
python3 \
tar \
xz \
&& \
ln -s /usr/bin/gcc10-gcc /usr/bin/cc && \
ln -s /usr/bin/gcc10-g++ /usr/bin/c++ && \
ln -s /usr/bin/gcc10-ar /usr/bin/ar && \
ln -s /usr/bin/gcc10-nm /usr/bin/nm && \
ln -s /usr/bin/gcc10-ld.bfd /usr/bin/ld && \
ln -s /usr/bin/gcc10-strip /usr/bin/strip && \
ln -s /usr/bin/gcc10-ranlib /usr/bin/ranlib && \
ln -s /usr/bin/gcc10-readelf /usr/bin/readelf && \
ln -sf /usr/bin/gcc10-ld.bfd /usr/bin/gcc10-ld && \
rm /usr/bin/gcc10-ld.gold && \
curl -sSfL https://github.com/Kitware/CMake/releases/download/v3.31.9/cmake-3.31.9-linux-x86_64.tar.gz | tar -xzv -C /opt/ && \
ln -s /opt/cmake-3.31.9-linux-x86_64/bin/cmake /usr/bin/cmake && \
ln -s /opt/cmake-3.31.9-linux-x86_64/bin/ctest /usr/bin/ctest && \
ln -s /opt/cmake-3.31.9-linux-x86_64/bin/cpack /usr/bin/cpack && \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
--default-toolchain nightly \
&& \
cargo install cargo-c --locked && \
pip3 install meson ninja tomli
# Compiler settings
ENV \
PKG_CONFIG="pkg-config --static" \
PLATFORM="linux-x64" \
FLAGS="-march=nehalem" \
RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/