docker-trackmania/Dockerfile

37 lines
907 B
Docker
Raw Permalink Normal View History

2023-11-18 15:12:16 +01:00
#Download base image debian 12
FROM debian:bookworm
2023-10-13 22:32:42 +02:00
# environment variables
ARG VERSION="Latest"
2024-07-08 10:13:27 +02:00
# Add labels
LABEL "server.game"="Trackmania"
LABEL "server.version"=${VERSION}
2023-10-13 22:32:42 +02:00
# Update repository
RUN apt-get update
# install dependencies
RUN apt-get install -y zip git vim wget xmlstarlet ncat xxd
# Prepare environment
RUN mkdir -p /opt/Trackmania
RUN wget -q -O /tmp/trackmania-server.zip "https://nadeo-download.cdn.ubi.com/trackmania/TrackmaniaServer_${VERSION}.zip"
RUN unzip /tmp/trackmania-server.zip -d /opt/Trackmania/
RUN rm -f /tmp/trackmania-server.zip
RUN cp -r /opt/Trackmania/UserData /opt/Trackmania/UserDataSaved
VOLUME /opt/Trackmania/UserData
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
WORKDIR /opt/Trackmania/
HEALTHCHECK --interval=5s --timeout=5s --start-period=20s --retries=3 \
CMD nc -z -v 127.0.0.1 5000 || exit 1
ENTRYPOINT ["/entrypoint.sh"]