FROM debian:buster-slim # Install software 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 # 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. # See 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 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 # Get and install serverconfig RUN wget https://dl.ardestani.org/cs16serverconfig.tar.gz RUN tar -zxvf cs16serverconfig.tar.gz RUN rm cs16serverconfig.tar.gz CMD /bin/bash -c '/home/csserver/csserver start; /bin/bash'