-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.buildenv
115 lines (102 loc) · 3.59 KB
/
Dockerfile.buildenv
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
FROM amazonlinux:2023
# install build dependencies
RUN dnf update \
&& dnf groupinstall -y "Development Tools" \
&& dnf install -y \
cmake \
readline-devel \
lua-devel \
openssl-devel \
libuuid-devel \
libtiff-devel \
sqlite-devel \
curl-devel \
python-devel \
jq \
meson \
llvm \
clang \
clang-tools-extra \
cppcheck \
&& dnf clean all \
&& rm -rf /var/cache/yum
# set working directory to root
WORKDIR /
# install rapidjson dependency
RUN git clone https://github.com/Tencent/rapidjson.git && \
cd rapidjson && \
# VERSION=`curl -s https://api.github.com/repos/Tencent/rapidjson/releases/latest | jq '.tag_name' | tr -d "\""` && \
# git checkout $VERSION && \ ### version v1.1.0 (latest as of 8/25/16) is broken with recent compilers
mkdir -p /build/rapidjson && \
cd /build/rapidjson && \
cmake /rapidjson && \
make -j8 && \
make install && \
ldconfig
# install arrow dependency
RUN git clone https://github.com/apache/arrow.git && \
cd arrow && \
# VERSION=`git describe --tags --abbrev=0` && \ ### version apache-arrow-16.0.0.dev is the latest tag and has a double-free memory bug
# git checkout $VERSION && \ ### and arrow does not have releases, only tags, so the last stable tag is 15.0.2 (as of 4/3/24)
git checkout apache-arrow-15.0.2 && \
mkdir -p /build/arrow && \
cd /build/arrow && \
cmake /arrow/cpp -DARROW_PARQUET=ON -DARROW_WITH_ZLIB=ON -DARROW_WITH_SNAPPY=ON -D ARROW_CSV=ON && \
make -j8 && \
make install && \
ldconfig
# install proj9 (gdal) dependency
RUN git clone https://github.com/OSGeo/PROJ.git && \
cd PROJ && \
VERSION=`curl -s https://api.github.com/repos/OSGeo/PROJ/releases/latest | jq '.tag_name' | tr -d "\""` && \
git checkout $VERSION && \
mkdir -p /build/proj && \
cd /build/proj && \
cmake /PROJ -DCMAKE_BUILD_TYPE=Release && \
make -j8 && \
make install && \
ldconfig
# install geotiff (gdal) dependency
RUN git clone https://github.com/OSGeo/libgeotiff.git && \
cd libgeotiff && \
VERSION=`curl -s https://api.github.com/repos/OSGeo/libgeotiff/releases/latest | jq '.tag_name' | tr -d "\""` && \
git checkout $VERSION && \
mkdir -p /build/geotiff && \
cd /build/geotiff && \
cmake /libgeotiff/libgeotiff -DCMAKE_BUILD_TYPE=Release && \
make -j8 && \
make install && \
ldconfig
# install geos (gdal) dependency
RUN git clone https://github.com/libgeos/geos.git && \
cd geos && \
VERSION=`curl -s https://api.github.com/repos/libgeos/geos/releases/latest | jq '.tag_name' | tr -d "\""` && \
git checkout $VERSION && \
mkdir -p /build/geos && \
cd /build/geos && \
cmake /geos -DCMAKE_BUILD_TYPE=Release && \
make -j8 && \
make install && \
ldconfig
# install gdal dependency
RUN git clone https://github.com/OSGeo/gdal.git && \
cd gdal && \
VERSION=`curl -s https://api.github.com/repos/OSGeo/gdal/releases/latest | jq '.tag_name' | tr -d "\""` && \
git checkout $VERSION && \
mkdir -p /build/gdal && \
cd /build/gdal && \
cmake /gdal -DCMAKE_BUILD_TYPE=Release -DBUILD_APPS=OFF -DGDAL_USE_SWIG:BOOL=OFF -DBUILD_PYTHON_BINDINGS:BOOL=OFF && \
make -j8 && \
make install && \
ldconfig
# install pistache dependency
RUN git clone https://github.com/pistacheio/pistache.git && \
cd pistache && \
meson setup build && \
meson install -C build && \
ldconfig
# configure any new shared libraries
RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/local.conf && ldconfig
# support interactive mode
WORKDIR /
CMD ["/bin/bash"]