2024-11-11 09:50:26 +01:00
|
|
|
ARG DOCKER_IMAGE=alpine:3.20
|
2024-08-11 19:26:15 +02:00
|
|
|
FROM $DOCKER_IMAGE AS builder
|
|
|
|
|
|
|
|
RUN apk add --no-cache build-base cmake \
|
|
|
|
gd-dev sqlite-dev postgresql-dev hiredis-dev leveldb-dev \
|
|
|
|
ninja
|
|
|
|
|
|
|
|
COPY . /usr/src/minetestmapper
|
|
|
|
WORKDIR /usr/src/minetestmapper
|
|
|
|
|
|
|
|
RUN cmake -B build -G Ninja && \
|
|
|
|
cmake --build build --parallel $(nproc) && \
|
|
|
|
cmake --install build
|
|
|
|
|
|
|
|
FROM $DOCKER_IMAGE AS runtime
|
|
|
|
|
|
|
|
RUN apk add --no-cache libstdc++ libgcc libpq \
|
|
|
|
gd sqlite-libs postgresql hiredis leveldb
|
|
|
|
|
2024-11-11 09:50:26 +01:00
|
|
|
COPY --from=builder /usr/local/share/luanti /usr/local/share/luanti
|
2024-08-11 19:26:15 +02:00
|
|
|
COPY --from=builder /usr/local/bin/minetestmapper /usr/local/bin/minetestmapper
|
|
|
|
COPY COPYING /usr/local/share/minetest/minetestmapper.COPYING
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/minetestmapper"]
|