initial import
This commit is contained in:
commit
d22055dd9a
3 changed files with 64 additions and 0 deletions
42
Dockerfile
Normal file
42
Dockerfile
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV LANG=C.UTF-8
|
||||||
|
ENV OPENTTD_JGR_VERSION=0.65.3
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
cmake \
|
||||||
|
git \
|
||||||
|
libsdl2-dev \
|
||||||
|
libsdl2-mixer-dev \
|
||||||
|
libfontconfig-dev \
|
||||||
|
libicu-dev \
|
||||||
|
libpng-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
liblzo2-dev \
|
||||||
|
libzstd-dev \
|
||||||
|
pkg-config \
|
||||||
|
wget \
|
||||||
|
unzip \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
WORKDIR /openttd
|
||||||
|
|
||||||
|
RUN git clone --depth 1 --branch jgrpp-$OPENTTD_JGR_VERSION https://github.com/JGRennison/OpenTTD-patches.git source
|
||||||
|
|
||||||
|
# Build the source
|
||||||
|
WORKDIR /openttd/source
|
||||||
|
RUN mkdir build && cd build && \
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release && \
|
||||||
|
make -j$(nproc)
|
||||||
|
|
||||||
|
WORKDIR /openttd
|
||||||
|
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
|
||||||
|
|
||||||
|
COPY start.sh /start.sh
|
||||||
|
RUN chmod +x /start.sh
|
||||||
|
CMD ["/start.sh"]
|
||||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
services:
|
||||||
|
openttd-jgr:
|
||||||
|
image: forgejo.venusian.stream/skkeeper/openttd-jgr:latest
|
||||||
|
container_name: openttd-jgr
|
||||||
|
volumes:
|
||||||
|
- ./save:/root/.openttd/save
|
||||||
|
# - ./content:/root/.openttd/content
|
||||||
|
# - ./config:/root/.openttd
|
||||||
|
ports:
|
||||||
|
- "3979:3979/udp"
|
||||||
|
- "3979:3979/tcp"
|
||||||
|
restart: unless-stopped
|
||||||
10
start.sh
Normal file
10
start.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
SAVE_FILE="/root/.openttd/save/autosave/latest.sav"
|
||||||
|
|
||||||
|
if [ -f "$SAVE_FILE" ]; then
|
||||||
|
echo "Loading savegame: $SAVE_FILE"
|
||||||
|
exec /openttd/source/build/openttd -D -g autosave/latest.sav
|
||||||
|
else
|
||||||
|
echo "No savegame found. Starting new game."
|
||||||
|
exec /openttd/source/build/openttd -D
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue