doom-docker/Dockerfile

63 lines
1.9 KiB
Docker
Raw Permalink Normal View History

2023-11-12 22:30:09 +01:00
# Cause fuck Ubuntu
2023-11-13 17:33:56 +01:00
FROM debian:bullseye-slim
2023-11-12 22:30:09 +01:00
2023-11-13 15:57:27 +01:00
# Who to contact
LABEL maintainer="cfultz <caleb@fultz.dev>"
# Default environment variables
ENV DEBIAN_FRONTEND noninteractive
ENV IWAD doom1.wad
ENV CONFIG default.cfg
ENV SERVER_NAME Docker-Doom
ENV START_MAP E1M1
2023-11-13 16:33:25 +01:00
ENV PWAD custom.pk3
2023-11-12 22:30:09 +01:00
# Update the OS
RUN apt-get update --yes
RUN apt-get upgrade --yes
# Helper libraries for adding repo
2023-11-13 16:01:29 +01:00
RUN apt-get install --yes dialog apt-utils wget libsdl-image1.2
2023-11-12 22:30:09 +01:00
# Adding Zandronum repo and installing the application
2023-11-13 17:33:56 +01:00
#RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1n-0+deb11u4_amd64.deb
#RUN gdebi --non-interactive libssl1.1_1.1.1n-0+deb11u4_amd64.deb
RUN wget -O /etc/apt/trusted.gpg.d/drdteam.gpg https://debian.drdteam.org/drdteam.gpg
RUN echo "deb https://debian.drdteam.org stable multiverse" >> /etc/apt/sources.list
2023-11-12 22:30:09 +01:00
RUN apt-get update --yes
RUN apt-get upgrade --yes
2023-11-13 16:54:48 +01:00
RUN apt-get install --yes --quiet zandronum
2023-11-12 22:30:09 +01:00
2023-11-13 16:08:17 +01:00
# Create zandronum user
2023-11-13 15:57:27 +01:00
RUN useradd -ms /bin/bash zandronum
2023-11-12 22:30:09 +01:00
# Build the app directory and add files
2023-11-13 15:57:27 +01:00
RUN mkdir /home/zandronum/config && \
mkdir /home/zandronum/wad/ && \
mkdir /home/zandronum/iwad/ && \
mkdir /home/zandronum/bin/ && \
mkdir /home/zandronum/player/ && \
mkdir /home/zandronum/logs/
COPY /config/ /home/zandronum/config/
COPY /bin/ /home/zandronum/bin/
COPY /player/ /home/zandronum/player/
COPY /iwad/ /home/zandronum/iwad/
COPY /wad/ /home/zandronum/wad/
# RUN wget -O /home/zandronum/config/masterbanlist.txt https://zandronum.com/banlist && \
# cat masterbanlist.txt >> /home/zandronum/player/banlist.txt
# Zandronum has a config 'sv_enforcemasterlist'
# so this isnt needed unless you want a local static copy
2023-11-12 22:46:30 +01:00
2023-11-12 22:30:09 +01:00
USER root
2023-11-13 15:57:27 +01:00
RUN chown -R zandronum:zandronum /home/zandronum
USER zandronum
WORKDIR /home/zandronum
RUN chmod +x /home/zandronum/bin/start.bash
2023-11-12 22:30:09 +01:00
2023-11-13 15:57:27 +01:00
CMD ["/home/zandronum/bin/start.bash"]
ENTRYPOINT [ "/home/zandronum/bin/start.bash" ]
2023-11-12 22:30:09 +01:00
EXPOSE 10666