30 lines
1.4 KiB
Docker
30 lines
1.4 KiB
Docker
FROM ubuntu:24.04 AS builder
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential cmake libssl-dev && rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /build
|
|
COPY CMakeLists.txt ./
|
|
COPY src/ src/
|
|
|
|
# TIBIA722=1 its already centralized in the CMakeLists
|
|
# QM_DATABASE=sqlite: the db stays as SQLITE with amalgamation bundled.
|
|
RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_GAME=ON -DBUILD_LOGIN=ON -DBUILD_QUERYMANAGER=ON \
|
|
-DQM_DATABASE=sqlite \
|
|
&& cmake --build build -j"$(nproc)"
|
|
|
|
# We verify if there's any binary missing
|
|
RUN ls -la /build/build/bin/game /build/build/bin/login /build/build/bin/querymanager
|
|
|
|
FROM ubuntu:24.04
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libssl3 sqlite3 && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /build/build/bin/game /opt/tibia/game-bin/game
|
|
COPY --from=builder /build/build/bin/login /opt/tibia/login-bin/login
|
|
COPY --from=builder /build/build/bin/querymanager /opt/tibia/qm-bin/querymanager
|
|
COPY --from=builder /build/src/querymanager/sqlite /opt/tibia/qm-sqlite
|
|
COPY --from=builder /build/src/querymanager/config.cfg.dist /opt/tibia/qm-config.cfg
|
|
COPY --from=builder /build/src/login/config.cfg.dist /opt/tibia/login-config.cfg
|
|
COPY entrypoint.sh /opt/tibia/entrypoint.sh
|
|
RUN chmod +x /opt/tibia/entrypoint.sh && mkdir /tibia-db
|
|
ENTRYPOINT ["/opt/tibia/entrypoint.sh"]
|