mirror of
https://github.com/systemed/tilemaker.git
synced 2026-05-06 16:30:00 -04:00
ba942f8b5b
* Dockerfile: one line per debian package * Dockerfile: reduce the size of the image By statically compile and using multi-cache build, the size of the image is now 88MB. Previously, it was around 700MB.
43 lines
941 B
Docker
43 lines
941 B
Docker
FROM debian:bullseye-slim AS src
|
|
LABEL Description="Tilemaker" Version="1.4.0"
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
# install dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
liblua5.1-0 \
|
|
liblua5.1-0-dev \
|
|
libprotobuf-dev \
|
|
libsqlite3-dev \
|
|
protobuf-compiler \
|
|
shapelib \
|
|
libshp-dev \
|
|
libboost-program-options-dev \
|
|
libboost-filesystem-dev \
|
|
libboost-system-dev \
|
|
libboost-iostreams-dev \
|
|
rapidjson-dev \
|
|
cmake
|
|
|
|
COPY CMakeLists.txt /
|
|
COPY cmake /cmake
|
|
COPY src /src
|
|
COPY include /include
|
|
|
|
WORKDIR /build
|
|
|
|
RUN cmake -DTILEMAKER_BUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ ..
|
|
RUN cmake --build .
|
|
RUN strip tilemaker
|
|
|
|
FROM debian:bullseye-slim
|
|
WORKDIR /
|
|
COPY --from=src /build/tilemaker .
|
|
COPY resources /resources
|
|
COPY process.lua .
|
|
COPY config.json .
|
|
|
|
ENTRYPOINT ["/tilemaker"]
|