This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues/pull-requests.
csgo/Dockerfile

40 lines
1.2 KiB
Docker

FROM bitnami/minideb:bullseye
ENV USER csgo
ENV HOME /server
ENV SOURCEMODVERSION 1.11
ENV METAMODVERSION 1.11
ENV CSGOSERVER $HOME/csgo
ENV STARTARGS "+game_type 0 +game_mode 1"
ENV TICKRATE 102.4
RUN install_packages lib32stdc++6 lib32z1 lib32gcc-s1 wget gzip curl ca-certificates nano locales net-tools \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN adduser --disabled-password --gecos "" --home $HOME $USER
ADD run.sh /
ADD csgo_ds.txt $HOME
ADD autoexec.cfg $HOME
ADD server.cfg $HOME
RUN mkdir -p $CSGOSERVER/csgo && \
mkdir $HOME/Steam && \
mkdir $CSGOSERVER/csgo/maps $CSGOSERVER/csgo/cfg $CSGOSERVER/csgo/addons && \
chown csgo:csgo -R /server && chown csgo:csgo /run.sh
RUN chmod +x /run.sh
RUN curl -fsSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz | tar -C . -xz
RUN mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin
USER csgo
WORKDIR $HOME
EXPOSE 27015
CMD ["/run.sh"]