mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 22:31:18 +00:00

Add quirk to handle upstream XMLs not having the correct nodes. Add initial map install based on the map in the config. Add package to allow for XML merging in the server container. Add an environment variable that prevents the server from starting, to test mod XML integration at server start. Back up logs into dedicated directories based on the date when the server exits. Improve logic for copying XML files into mpmissions. Fix status output formatting. Get map name from the config at script start in the server script. Refactor XML env scripts so they don't have a hashbang. Refactor one mod's integration with the new file naming convention.
55 lines
1.5 KiB
Docker
55 lines
1.5 KiB
Docker
FROM debian:bullseye
|
|
|
|
# Set debconf to run non-interactively and agree to the SteamCMD EULA
|
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
|
|
|
# Add contrib and backports
|
|
RUN sed -i /etc/apt/sources.list -e 's/main/main contrib non-free/'
|
|
|
|
RUN echo 'deb http://deb.debian.org/debian bullseye-backports main non-free' >> /etc/apt/sources.list
|
|
|
|
# Install _only_ the necessary packages
|
|
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
|
curl \
|
|
ca-certificates \
|
|
git \
|
|
gwenhywfar-tools \
|
|
jq \
|
|
libsdl2-2.0-0 \
|
|
libcap2 \
|
|
libxml2-utils \
|
|
locales \
|
|
nano \
|
|
procps \
|
|
wget \
|
|
xmlstarlet
|
|
|
|
# Set the locale
|
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANGUAGE en_US:en
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
# Add our scripts directory to PATH
|
|
ENV PATH /files/bin:/server:${PATH}
|
|
|
|
# Add py3rcon
|
|
RUN cd /usr/local && git clone https://github.com/indepth666/py3rcon.git
|
|
|
|
# Setup a non-privileged user
|
|
RUN groupadd user && \
|
|
useradd -l -g user user && \
|
|
mkdir -p /home/user /serverfiles/mpmissions /mods /mpmissions /profiles && \
|
|
chown -R user:user /home/user /serverfiles /mods /mpmissions /profiles
|
|
|
|
# Add our startup script, as this rarely changes.
|
|
COPY --chown=user:user start.sh /usr/local/bin/start.sh
|
|
|
|
# Use our non-privileged user
|
|
USER user
|
|
|
|
# The dayzserver script expects a home directory to itself.
|
|
WORKDIR /home/user
|
|
|
|
# Run the server.
|
|
CMD ["start.sh"]
|