Browse Source

feat: download all functions preemptively

pull/4/head
Daniel Gibbs 3 years ago
parent
commit
d211b439ae
  1. 28
      Dockerfile

28
Dockerfile

@ -20,16 +20,17 @@ RUN echo "**** Install Base LinuxGSM Requirements ****" \
&& add-apt-repository multiverse \ && add-apt-repository multiverse \
&& apt-get update \ && apt-get update \
&& apt-get install -y \ && apt-get install -y \
cron \
bc \ bc \
binutils \ binutils \
bsdmainutils \ bsdmainutils \
bzip2 \ bzip2 \
ca-certificates \ ca-certificates \
cron \
cpio \ cpio \
curl \ curl \
distro-info \ distro-info \
file \ file \
git \
gzip \ gzip \
hostname \ hostname \
jq \ jq \
@ -37,20 +38,19 @@ RUN echo "**** Install Base LinuxGSM Requirements ****" \
lib32stdc++6 \ lib32stdc++6 \
netcat \ netcat \
python3 \ python3 \
sudo \
tar \ tar \
tini \
tmux \ tmux \
unzip \ unzip \
util-linux \ util-linux \
wget \ wget \
xz-utils \ xz-utils \
# Docker Extras # Docker Extras
cron \
iproute2 \ iproute2 \
iputils-ping \ iputils-ping \
nano \ nano \
vim \ vim
sudo \
tini
# Install NodeJS # Install NodeJS
RUN echo "**** Install NodeJS ****" \ RUN echo "**** Install NodeJS ****" \
@ -91,17 +91,27 @@ RUN echo "**** Add linuxgsm user ****" \
## Download linuxgsm.sh ## Download linuxgsm.sh
RUN echo "**** Download linuxgsm.sh ****" \ RUN echo "**** Download linuxgsm.sh ****" \
&& set -ex \ && set -ex \
&& wget -O linuxgsm.sh https://linuxgsm.sh \ && wget -O linuxgsm.sh https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/linuxgsm.sh \
&& chmod +x /linuxgsm.sh && chmod +x /linuxgsm.sh
WORKDIR /home/linuxgsm WORKDIR /home/linuxgsm
ENV PATH=$PATH:/home/linuxgsm ENV PATH=$PATH:/home/linuxgsm
USER linuxgsm USER linuxgsm
# Run SteamCMD as LinuxGSM user
RUN steamcmd +quit
RUN git clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/GameServerManagers/LinuxGSM.git; \
cd LinuxGSM; \
git sparse-checkout set lgsm/functions; \
git checkout; \
mkdir -p /home/linuxgsm/lgsm/functions; \
mv lgsm/functions/* /home/linuxgsm/lgsm/functions; \
rm -rf /home/linuxgsm/LinuxGSM
# Add LinuxGSM cronjobs # Add LinuxGSM cronjobs
RUN (crontab -l 2>/dev/null; echo "*/5 * * * * /home/linuxgsm/*server monitor > /dev/null 2>&1") | crontab - RUN (crontab -l 2>/dev/null; echo "*/1 * * * * /home/linuxgsm/*server monitor > /dev/null 2>&1") | crontab -
RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /home/linuxgsm/*server update > /dev/null 2>&1") | crontab - RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /home/linuxgsm/*server update > /dev/null 2>&1") | crontab -
RUN (crontab -l 2>/dev/null; echo "0 1 * * 0 /home/linuxgsm/*server update-lgsm > /dev/null 2>&1") | crontab - RUN (crontab -l 2>/dev/null; echo "0 1 * * 0 /home/linuxgsm/*server update-lgsm > /dev/null 2>&1") | crontab -
# Run SteamCMD as LinuxGSM user COPY entrypoint.sh /home/linuxgsm/entrypoint.sh
RUN steamcmd +quit

Loading…
Cancel
Save