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

Logging into to Steam, accounting for Steam Guard. These credentials persist throughout the lifetime of the docker volume storing the data. Adding/removing/managing workshop items. The goal is to also manage the "=mod=" parameter. Listing the auto-generated RCON password. Backing up. Further refine the original dayzserver script. In docker, a lot of the other stuff wasn't necessary so a lot is just being removed. Install steamcmd into the container in Dockerfile and adjust paths. Vastly updated docs!
57 lines
1.4 KiB
Docker
57 lines
1.4 KiB
Docker
FROM debian:bullseye
|
|
|
|
# Replace shell with bash so we can source files
|
|
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
|
|
|
|
# Set debconf to run non-interactively
|
|
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/'
|
|
|
|
#RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list
|
|
|
|
# Add 32 bit arch for steam crap
|
|
RUN dpkg --add-architecture i386
|
|
|
|
# Install necessary packages
|
|
RUN apt-get update && apt-get -y upgrade && apt-get -y install \
|
|
nano \
|
|
curl \
|
|
lib32gcc-s1 \
|
|
lib32stdc++6 \
|
|
libcap2 \
|
|
locales \
|
|
psmisc \
|
|
wget \
|
|
rename
|
|
|
|
# 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 steamcmd to the image
|
|
RUN mkdir -p /steamcmd && \
|
|
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxf - -C steamcmd
|
|
|
|
# Make our docker scripts easier to run
|
|
ENV PATH /files:/steamcmd:${PATH}
|
|
|
|
# Setup a non-privileged user
|
|
RUN groupadd user && \
|
|
useradd -l -m -g user user
|
|
|
|
# The volume needs to be owned by the user
|
|
RUN cd /home/user; rm -rf *; rm -rf .*; chown user:user /home/user -R
|
|
|
|
# Use our non-privileged user
|
|
USER user
|
|
|
|
# The dayzserver script expects a home directory to itself.
|
|
WORKDIR /home/user
|
|
|
|
# Run the server.
|
|
CMD ["dayzserver", "start"]
|