openttd-jgr/Dockerfile

55 lines
1.1 KiB
Text
Raw Normal View History

2025-06-02 23:37:27 +00:00
FROM alpine:latest AS builder
2025-06-02 11:11:05 +00:00
2025-07-24 23:19:13 +00:00
ENV OPENTTD_JGR_VERSION=0.65.4
2025-06-02 11:11:05 +00:00
2025-06-02 17:26:15 +00:00
RUN apk add --no-cache \
2025-06-02 11:11:05 +00:00
git \
2025-06-02 17:26:15 +00:00
build-base \
cmake \
sdl2-dev \
sdl2_mixer-dev \
fontconfig-dev \
icu-dev \
2025-06-02 11:11:05 +00:00
libpng-dev \
2025-06-02 17:26:15 +00:00
xz-dev \
lzo-dev \
zstd-dev \
2025-06-02 11:11:05 +00:00
wget \
unzip \
2025-06-02 17:26:15 +00:00
bash \
curl \
pkgconfig \
freetype-dev \
bzip2-dev
2025-06-02 11:11:05 +00:00
WORKDIR /openttd
RUN git clone --depth 1 --branch jgrpp-$OPENTTD_JGR_VERSION https://github.com/JGRennison/OpenTTD-patches.git source
WORKDIR /openttd/source
RUN mkdir build && cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release -DOPTION_DEDICATED=ON && \
2025-06-02 11:11:05 +00:00
make -j$(nproc)
2025-06-02 23:37:27 +00:00
FROM alpine:latest
2025-06-02 11:11:05 +00:00
WORKDIR /openttd
2025-06-02 23:37:27 +00:00
COPY --from=builder /openttd/source/build /openttd
2025-06-02 11:11:05 +00:00
RUN mkdir -p /root/.openttd/baseset && \
wget -q https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip && \
unzip opengfx-7.1-all.zip -d /root/.openttd/baseset && \
rm opengfx-7.1-all.zip
2025-06-02 23:37:27 +00:00
RUN apk add --no-cache \
sdl2-dev \
fontconfig-dev \
icu-dev \
lzo-dev
2025-06-02 11:11:05 +00:00
COPY start.sh /start.sh
RUN chmod +x /start.sh
2025-06-02 23:37:27 +00:00
2025-06-02 11:11:05 +00:00
CMD ["/start.sh"]