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 1
1
FROM debian:bookworm-slim AS src
2
2
LABEL Description="Tilemaker" Version="1.4.0"
3
3
4
+ ARG BUILD_DEBUG=
5
+
4
6
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
5
7
build-essential \
6
8
liblua5.1-0-dev \
@@ -25,21 +27,33 @@ COPY server ./server
25
27
26
28
RUN mkdir build && \
27
29
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; \
29
35
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
32
40
33
41
ENV PATH="/usr/src/app/build:$PATH"
34
42
35
43
FROM debian:bookworm-slim
44
+
45
+ ARG BUILD_DEBUG=
46
+
36
47
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
37
48
liblua5.1-0 \
38
49
shapelib \
39
50
libsqlite3-0 \
40
51
lua-sql-sqlite3 \
41
52
libboost-filesystem1.74.0 \
42
53
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; \
43
57
rm -rf /var/lib/apt/lists/*
44
58
45
59
WORKDIR /usr/src/app
Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ Build from project root directory with:
60
60
61
61
docker build . -t tilemaker
62
62
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
+
63
68
The docker container can be run like this:
64
69
65
70
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