mirror of
https://codeberg.org/spire/docker-tf2-server.git
synced 2026-06-03 09:54:20 +02:00
update base image
This commit is contained in:
parent
0ebf4da114
commit
3784620a33
6 changed files with 34 additions and 24 deletions
2
.github/workflows/docker.yaml
vendored
2
.github/workflows/docker.yaml
vendored
|
|
@ -10,7 +10,7 @@ on:
|
|||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
|
|
|||
39
Dockerfile
39
Dockerfile
|
|
@ -1,23 +1,34 @@
|
|||
from 32bit/ubuntu:16.04
|
||||
from ubuntu:22.04
|
||||
maintainer Robin Appelman <robin@icewind.nl>
|
||||
|
||||
RUN apt-get -y update \
|
||||
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install libstdc++6 libcurl3-gnutls wget libncurses5 bzip2 unzip vim nano \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
RUN echo steam steam/question select "I AGREE" | debconf-set-selections \
|
||||
&& echo steam steam/license note '' | debconf-set-selections \
|
||||
&& apt-get -y update \
|
||||
&& apt-get -y install software-properties-common \
|
||||
&& add-apt-repository multiverse \
|
||||
&& dpkg --add-architecture i386 \
|
||||
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install libstdc++6 libcurl3-gnutls wget libncurses5 bzip2 unzip vim nano lib32gcc-s1 lib32stdc++6 steamcmd \
|
||||
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ca-certificates \
|
||||
lib32z1 \
|
||||
libncurses5:i386 \
|
||||
libbz2-1.0:i386 \
|
||||
libtinfo5:i386 \
|
||||
libcurl3-gnutls:i386 \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& useradd -m tf2 \
|
||||
&& su tf2 -c '/usr/games/steamcmd +quit'
|
||||
|
||||
USER tf2
|
||||
|
||||
ENV USER tf2
|
||||
|
||||
RUN useradd $USER
|
||||
ENV HOME /home/$USER
|
||||
RUN mkdir $HOME
|
||||
RUN chown $USER:$USER $HOME
|
||||
|
||||
USER $USER
|
||||
ENV SERVER $HOME/hlserver
|
||||
RUN mkdir $SERVER
|
||||
RUN wget -O - http://media.steampowered.com/client/steamcmd_linux.tar.gz | tar -C $SERVER -xvz
|
||||
ADD tf2_ds.txt update.sh tf.sh clean.sh $SERVER/
|
||||
RUN $SERVER/update.sh && $SERVER/clean.sh
|
||||
|
||||
ADD --chown=tf2:tf2 tf2_ds.txt update.sh clean.sh tf.sh $SERVER/
|
||||
RUN mkdir -p $SERVER/tf2 \
|
||||
&& $SERVER/update.sh \
|
||||
&& $SERVER/clean.sh
|
||||
|
||||
EXPOSE 27015/udp
|
||||
|
||||
|
|
|
|||
12
clean.sh
12
clean.sh
|
|
@ -1,14 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
ls -l $SERVER
|
||||
ls -l /home/tf2/hlserver/tf2
|
||||
cd $SERVER/tf2/tf/maps
|
||||
|
||||
MAPS_KEEP=("cp_badlands.bsp")
|
||||
MAPS_ALL=( $(find -type f -name "*.bsp" -printf "%f\n") )
|
||||
|
||||
# MAPS_DELETE=($(diff MAPS_ALL[@] MAPS_KEEP[@]))
|
||||
MAPS_DELETE=$(echo ${MAPS_ALL[@]} ${MAPS_KEEP[@]} | tr ' ' '\n' | sort | uniq -u)
|
||||
|
||||
rm ${MAPS_DELETE[@]}
|
||||
mv cp_badlands.{bsp,keep}
|
||||
rm *.bsp
|
||||
mv cp_badlands.{keep,bsp}
|
||||
|
||||
cd $SERVER/tf2/tf
|
||||
|
||||
|
|
|
|||
1
tf.sh
1
tf.sh
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
cd $HOME/hlserver
|
||||
./update.sh
|
||||
tf2/srcds_run -game tf -autoupdate -steam_dir ~/hlserver -steamcmd_script ~/hlserver/tf2_ds.txt $@
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
login anonymous
|
||||
force_install_dir ./tf2
|
||||
force_install_dir /home/tf2/hlserver/tf2/
|
||||
app_update 232250
|
||||
quit
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd $HOME/hlserver
|
||||
./steamcmd.sh +runscript tf2_ds.txt
|
||||
/usr/games/steamcmd +runscript $HOME/hlserver/tf2_ds.txt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue