37 lines
907 B
Docker
37 lines
907 B
Docker
#Download base image debian 12
|
|
FROM debian:bookworm
|
|
|
|
# environment variables
|
|
ARG VERSION="Latest"
|
|
|
|
# Add labels
|
|
LABEL "server.game"="Trackmania"
|
|
LABEL "server.version"=${VERSION}
|
|
|
|
# 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"]
|