11FROM --platform=linux/amd64 amazonlinux:2023
22
3- # todo- remove rapidjson
3+ ARG NODE_VERSION="22.15.0"
4+ ARG OSRM_VERSION="6.0.0"
5+ ARG TILEMAKER_VERSION="3.0.0"
6+ ARG MAPNIK_VERSION="4.1.3"
7+
48RUN yum -y install libxml2-devel bzip2-devel boost-devel libzip-devel \
59 lua.x86_64 lua-devel.x86_64 luajit.x86_64 luajit-devel.x86_64 \
6- expat expat-devel sqlite-devel rapidjson-devel libatomic \
7- bzip2 diffutils binutils gcc14 gcc14-c++ cmake unzip wget tar xz gzip
10+ expat expat-devel sqlite-devel libatomic bzip2 diffutils binutils \
11+ gcc14 gcc14-c++ cmake unzip wget tar xz gzip
812
913WORKDIR /home
1014
@@ -13,19 +17,19 @@ RUN tar -xf onetbb.tgz && \
1317 cp -a oneapi-tbb-2022.1.0/lib/intel64/gcc4.8/. /usr/local/lib/ && \
1418 cp -a oneapi-tbb-2022.1.0/include/. /usr/local/include/
1519
16- RUN wget "https://nodejs.org/dist/v22.15.0 /node-v22.15.0 -linux-x64.tar.xz" -O node.tgz
20+ RUN wget "https://nodejs.org/dist/v${NODE_VERSION} /node-v${NODE_VERSION} -linux-x64.tar.xz" -O node.tgz
1721RUN tar -xf node.tgz && \
18- ls node-v22.15.0 -linux-x64 && \
19- cp -a node-v22.15.0 -linux-x64/bin/. /usr/local/bin && \
20- cp -a node-v22.15.0 -linux-x64/include/. /usr/local/include && \
21- cp -a node-v22.15.0 -linux-x64/lib/. /usr/local/lib && \
22- cp -a node-v22.15.0 -linux-x64/share/. /usr/local/share && \
22+ ls node-v${NODE_VERSION} -linux-x64 && \
23+ cp -a node-v${NODE_VERSION} -linux-x64/bin/. /usr/local/bin && \
24+ cp -a node-v${NODE_VERSION} -linux-x64/include/. /usr/local/include && \
25+ cp -a node-v${NODE_VERSION} -linux-x64/lib/. /usr/local/lib && \
26+ cp -a node-v${NODE_VERSION} -linux-x64/share/. /usr/local/share && \
2327 export PATH="$PATH:/usr/local/bin" && \
2428 node -v
2529
26- RUN wget "https://github.com/Project-OSRM/osrm-backend/archive/refs/tags/v6.0.0 .tar.gz" -O osrm.tgz
30+ RUN wget "https://github.com/Project-OSRM/osrm-backend/archive/refs/tags/v${OSRM_VERSION} .tar.gz" -O osrm.tgz
2731RUN tar -xf osrm.tgz && \
28- cd osrm-backend-6.0.0 && \
32+ cd osrm-backend-${OSRM_VERSION} && \
2933 npm install --ignore-scripts && \
3034 sed -i -e 's/LUA_COMPAT_5_2/LUA_COMPAT_5_2 1/g' /usr/include/luaconf-x86_64.h && \
3135 sed -i '1s/^/#include <utility>\n /' /usr/include/boost/asio/awaitable.hpp && \
@@ -69,7 +73,7 @@ RUN tar -xf osmium.tgz && \
6973 cmake --build .
7074
7175RUN wget "https://github.com/OSGeo/shapelib/releases/download/v1.6.1/shapelib-1.6.1.tar.gz" -O shapelib.tgz
72- RUN wget "https://github.com/systemed/tilemaker/archive/refs/tags/v3.0.0 .tar.gz" -O tilemaker.tgz
76+ RUN wget "https://github.com/systemed/tilemaker/archive/refs/tags/v${TILEMAKER_VERSION} .tar.gz" -O tilemaker.tgz
7377RUN tar -xf shapelib.tgz && \
7478 cd shapelib-1.6.1 && \
7579 CXX=gcc14-g++ ./configure && \
@@ -84,13 +88,13 @@ RUN unzip rapidjson.zip && \
8488 cmake --build . && \
8589 cmake --install .
8690RUN tar -xf tilemaker.tgz && \
87- cd tilemaker-3.0.0 && \
91+ cd tilemaker-${TILEMAKER_VERSION} && \
8892 mkdir build && \
8993 cd build && \
9094 CXX=gcc14-g++ CC=gcc14-cc cmake .. && \
9195 cmake --build .
9296
93- RUN cd osrm-backend-6.0.0 && \
97+ RUN cd osrm-backend-${OSRM_VERSION} && \
9498 mkdir -p /home/export/node_modules/@project-osrm/osrm/lib && \
9599 cp package.json /home/export/node_modules/@project-osrm/osrm/ && \
96100 cp package-lock.json /home/export/node_modules/@project-osrm/osrm/ && \
@@ -113,7 +117,7 @@ RUN cd osrm-backend-6.0.0 && \
113117 mkdir /home/export/bin && \
114118 cp build/src/osmium /home/export/bin/osmium && \
115119 cp /usr/lib64/libexpat.so.1 /home/export/lib/ && \
116- cd ../tilemaker-3.0.0 && \
120+ cd ../tilemaker-${TILEMAKER_VERSION} && \
117121 cp /usr/local/lib/libshp.so.4 /home/export/lib/ && \
118122 cp /usr/lib64/libatomic.so.1 /home/export/lib/ && \
119123 cp build/tilemaker /home/export/bin/tilemaker && \
0 commit comments