FROM debian:buster-slim # Install dependencies RUN dpkg --add-architecture i386 RUN apt-get update && \ apt-get install -y apt-utils vim curl wget file tar bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 cpio sudo procps iproute2 libsdl2-2.0-0:i386 # Install gamedig # GameDig is a tool that queries game servers and returns outputs data from a query into json format. It can not only check if the game server is online but also return various data such as current maps and players. This allows ./gameserver details to display live information. # https://github.com/gamedig/node-gamedig RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - RUN apt-get install -y nodejs RUN npm install gamedig -g # Create new sudo user RUN useradd -m -s /bin/bash csserver RUN usermod -aG sudo csserver RUN echo 'csserver ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers # Switch user USER csserver WORKDIR /home/csserver # Download linuxgsm.sh # LinuxGSM is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. # https://github.com/GameServerManagers/LinuxGSM RUN wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh csserver # Installation of dependencies requires either sudo or root access. LinuxGSM can automatically install dependencies if the user has sudo or is root. RUN sudo ./csserver install # Auto install is useful for automatic server deployments as no user prompt is required. RUN ./csserver auto-install # Install config, metamod & amxmodx # http://metamod.org/ # https://www.amxmodx.org/ COPY --chown=csserver ./src/csserver/ ./src/scripts/mapcheck.js ./ # Add big kreedz mappack RUN wget https://dl.ardestani.org/kreedz-mappack.tar.gz \ && tar zxvpf kreedz-mappack.tar.gz -C ./serverfiles \ && rm kreedz-mappack.tar.gz CMD /bin/bash -c '/home/csserver/csserver start; /bin/bash'