forked from lovell/sharp-libvips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (40 loc) · 1.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
FROM arm64v8/centos:7
LABEL maintainer="Lovell Fuller <[email protected]>"
# Create CentOS 7 (glibc 2.17) container suitable for building Linux ARM64v8-A binaries
# Path settings
ENV \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:/opt/rh/devtoolset-10/root/usr/bin:/opt/rh/rh-python38/root/usr/bin:/opt/rh/rh-python38/root/usr/local/bin:$PATH"
# Build dependencies
RUN \
yum update -y && \
yum install -y epel-release centos-release-scl && \
yum group install -y "Development Tools" && \
yum install -y --setopt=tsflags=nodocs \
advancecomp \
brotli \
cmake3 \
# FIXME: Update to devtoolset-11, see: https://bugs.centos.org/view.php?id=18393
devtoolset-10-gcc \
devtoolset-10-gcc-c++ \
gperf \
jq \
nasm \
rh-python38 \
&& \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
--default-host aarch64-unknown-linux-gnu \
&& \
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
pip3 install meson ninja
# Compiler settings
ENV \
PKG_CONFIG="pkg-config --static" \
PLATFORM="linux-arm64v8" \
FLAGS="-march=armv8-a" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/