<commit_before>FROM renshou/steamcmd:latest

# Prevent some warnings
ARG DEBIAN_FRONTEND=noninteractive

# Default port binding
ENV BIND_PORT=27015
ENV BIND_IP=0.0.0.0

# SRCDS parameters
ENV SRCDS_GAME=left4dead2
ENV SRCDS_HOSTNAME="Speranza's L4D2"

# Download MM and SM
ADD http://mirror.pointysoftware.net/alliedmodders/mmsource-1.10.6-linux.tar.gz /tmp/mm.tar.gz
ADD https://sm.alliedmods.net/smdrop/1.8/sourcemod-1.8.0-git5974-linux.tar.gz /tmp/sm.tar.gz

# Copy scripts
COPY update.txt /srv/srcds/update.txt
COPY start.sh /srv/srcds/start.sh

# Copy cfg
COPY server.cfg /srv/srcds/server.cfg

# Create forward mount symlinks
RUN mkdir -p /mnt/srcds \
    && ln -s /srv/srcds/serverfiles/${SRCDS_GAME}/addons /mnt/srcds/addons \
    && ln -s /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/sourcemod /mnt/srcds/cfg_sourcemod \
    && ln -s /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/server.cfg /mnt/srcds/server.cfg

# Create reverse mount symlinks
RUN mkdir -p /srv/srcds/serverfiles/${SRCDS_GAME}/cfg \
    && ln -s /srv/srcds/cfg_sourcemod /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/sourcemod \
    && ln -s /srv/srcds/addons /srv/srcds/serverfiles/${SRCDS_GAME}/addons \
    && ln -s /srv/srcds/server.cfg /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/server.cfg

# Assign ownership
RUN chown -R gameserver:gameserver /srv/srcds /tmp/mm.tar.gz /tmp/sm.tar.gz \
    && chmod +x /srv/srcds/start.sh

# Switch to non root user
USER gameserver<commit_msg>Update Dockerfile<commit_after>FROM renshou/steamcmd:latest

# Prevent some warnings
ARG DEBIAN_FRONTEND=noninteractive

# Default port binding
ENV BIND_PORT=27015
ENV BIND_IP=0.0.0.0

# SRCDS parameters
ENV SRCDS_GAME=left4dead2
ENV SRCDS_HOSTNAME="Speranza's L4D2"

# Download MM and SM
ADD http://mirror.pointysoftware.net/alliedmodders/mmsource-1.10.6-linux.tar.gz /tmp/mm.tar.gz
ADD https://sm.alliedmods.net/smdrop/1.8/sourcemod-1.8.0-git5974-linux.tar.gz /tmp/sm.tar.gz

# Copy scripts
COPY update.txt /srv/srcds/update.txt
COPY start.sh /srv/srcds/start.sh

# Copy cfg
COPY server.cfg /srv/srcds/server.cfg

# Create forward mount symlinks
RUN mkdir -p /mnt/srcds \
    && ln -s /srv/srcds/serverfiles/${SRCDS_GAME}/addons /mnt/srcds/addons \
    && ln -s /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/sourcemod /mnt/srcds/cfg_sourcemod \
    && ln -s /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/server.cfg /mnt/srcds/server.cfg

# Create reverse mount symlinks
RUN mkdir -p /srv/srcds/serverfiles/${SRCDS_GAME}/cfg \
    && ln -s /srv/srcds/cfg_sourcemod /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/sourcemod \
    && ln -s /srv/srcds/addons /srv/srcds/serverfiles/${SRCDS_GAME}/addons \
    && ln -s /srv/srcds/server.cfg /srv/srcds/serverfiles/${SRCDS_GAME}/cfg/server.cfg

# Create user customization folders
RUN mkdir /srv/srcds/cfg_sourcemod /srv/srcds/addons

# Assign ownership
RUN chown -R gameserver:gameserver /srv/srcds /tmp/mm.tar.gz /tmp/sm.tar.gz \
    && chmod +x /srv/srcds/start.sh

# Switch to non root user
USER gameserver
{'fraction_non_alphanumeric': 0.14175603217158178, 'fraction_numerical': 0.01742627345844504, 'mean_word_length': 3.6640625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '39756', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1259, 'n_words': 214}