File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 11FROM debian:bookworm-slim AS src
22LABEL Description="Tilemaker" Version="1.4.0"
33
4+ ARG BUILD_DEBUG=
5+
46RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
57 build-essential \
68 liblua5.1-0-dev \
@@ -25,21 +27,33 @@ COPY server ./server
2527
2628RUN mkdir build && \
2729 cd build && \
28- cmake -DCMAKE_BUILD_TYPE=Release .. && \
30+ if [ -z "$BUILD_DEBUG" ]; then \
31+ cmake -DCMAKE_BUILD_TYPE=Release ..; \
32+ else \
33+ cmake -DCMAKE_BUILD_TYPE=Debug ..; \
34+ fi; \
2935 cmake --build . --parallel $(nproc) && \
30- strip tilemaker && \
31- strip tilemaker-server
36+ if [ -z "$BUILD_DEBUG" ]; then \
37+ strip tilemaker && \
38+ strip tilemaker-server; \
39+ fi
3240
3341ENV PATH="/usr/src/app/build:$PATH"
3442
3543FROM debian:bookworm-slim
44+
45+ ARG BUILD_DEBUG=
46+
3647RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
3748 liblua5.1-0 \
3849 shapelib \
3950 libsqlite3-0 \
4051 lua-sql-sqlite3 \
4152 libboost-filesystem1.74.0 \
4253 libboost-program-options1.74.0 && \
54+ if [ -n "$BUILD_DEBUG" ]; then \
55+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gdb; \
56+ fi; \
4357 rm -rf /var/lib/apt/lists/*
4458
4559WORKDIR /usr/src/app
Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ Build from project root directory with:
6060
6161 docker build . -t tilemaker
6262
63+ It can also be build with a ` BUILD_DEBUG ` build argument, which will build the executables for Debug, and not strip out symbols. ` gdb ` will also
64+ installed to facilate debugging:
65+
66+ docker build . --build-arg BUILD_DEBUG=1 -t tilemaker
67+
6368The docker container can be run like this:
6469
6570 docker run -it --rm -v $(pwd):/data tilemaker /data/monaco-latest.osm.pbf --output /data/monaco-latest.pmtiles
You can’t perform that action at this time.
0 commit comments