Skip to content

Instantly share code, notes, and snippets.

@frostu8
Last active July 18, 2019 14:14
Show Gist options
  • Select an option

  • Save frostu8/72fc738dfc05ccda0373ebd75fa534b4 to your computer and use it in GitHub Desktop.

Select an option

Save frostu8/72fc738dfc05ccda0373ebd75fa534b4 to your computer and use it in GitHub Desktop.
SCP:SL, but in a dockerfile. The dockerfile requires config_gameplay.txt, config_remoteadmin.txt, and ReservedSlots.txt in the build directory, along with the scp_multiadmin.cfg attached to this gist. Add any SMod plugins to the "plugins" folder in the build directory.
# AAAAAAAAA
FROM mono:latest
LABEL maintainer="frostbytes"
ENV STEAMAPPID 786920
ENV INSTALLDIR /home/scpsl
ENV STEAMCMDDIR ${INSTALLDIR}/steamcmd
ENV CONFIGDIR ${INSTALLDIR}/config
ENV PLUGINSDIR ${INSTALLDIR}/sm_plugins
# first, get steamcmd...
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
lib32stdc++6 \
lib32gcc1 \
wget \
ca-certificates \
&& useradd -m scpsl \
&& mkdir -p ${STEAMCMDDIR} \
&& cd ${STEAMCMDDIR} \
&& wget -qO- 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar zxf - \
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
# install SCP Server
RUN ${STEAMCMDDIR}/steamcmd.sh \
+login anonymous \
+force_install_dir ${INSTALLDIR} \
+app_update ${STEAMAPPID} -beta beta validate \
+quit
# configure everything
RUN mkdir ${CONFIGDIR}
ADD ./scp_multiadmin.cfg ${INSTALLDIR}/scp_multiadmin.cfg
ADD ./config_gameplay.txt ${CONFIGDIR}/config_gameplay.txt
ADD ./config_remoteadmin.txt ${CONFIGDIR}/config_remoteadmin.txt
ADD ./ReservedSlots.txt ${CONFIGDIR}/ReservedSlots.txt
# copy plugins
ADD ./plugins/* ${PLUGINSDIR}
# chown everything in the scpsl install directory
RUN chown -R scpsl:scpsl ${INSTALLDIR}
RUN chown -R scpsl:scpsl ${CONFIGDIR}
RUN chown -R scpsl:scpsl ${STEAMCMDDIR}
USER scpsl
WORKDIR ${INSTALLDIR}
VOLUME ${CONFIGDIR}
VOLUME ${PLUGINSDIR}
ENTRYPOINT ${STEAMCMDDIR}/steamcmd.sh \
+login anonymous \
+force_install_dir ${INSTALLDIR} \
+app_update ${STEAMAPPID} -beta beta validate \
+quit \
&& mono ${INSTALLDIR}/MultiAdmin.exe
EXPOSE 7777/tcp
EXPOSE 7777/udp
use_new_input_system: false
set_title_bar: false
config_location: ./config
max_memory: 4096
restart_low_memory_roundend: 1024
restart_low_memory: 256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment