-
Notifications
You must be signed in to change notification settings - Fork 229
/
Dockerfile
56 lines (47 loc) · 1.5 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
FROM debian:bookworm-slim AS src
LABEL Description="Tilemaker" Version="1.4.0"
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
liblua5.1-0-dev \
libsqlite3-dev \
libshp-dev \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-iostreams-dev \
rapidjson-dev \
cmake \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY CMakeLists.txt ./
COPY cmake ./cmake
COPY src ./src
COPY include ./include
COPY server ./server
RUN mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
cmake --build . --parallel $(nproc) && \
strip tilemaker && \
strip tilemaker-server
ENV PATH="/usr/src/app/build:$PATH"
FROM debian:bookworm-slim
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
liblua5.1-0 \
shapelib \
libsqlite3-0 \
libboost-filesystem1.74.0 \
libboost-program-options1.74.0 \
libboost-iostreams1.74.0 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY --from=src /usr/src/app/build/tilemaker .
COPY --from=src /usr/src/app/build/tilemaker-server .
COPY resources ./resources
COPY process.lua ./
COPY config.json ./
ENV PATH="/usr/src/app/build:$PATH"
# Entrypoint for docker, wrapped with /bin/sh to remove requirement for executable permissions on script
ENTRYPOINT ["/bin/sh", "/usr/src/app/resources/docker-entrypoint.sh"]
CMD ["--help"]