mirror of
https://codeberg.org/spire/docker-tf2-server.git
synced 2026-06-03 09:54:20 +02:00
remove unused maps
This commit is contained in:
parent
da9e07611a
commit
bf9d31e1f9
3 changed files with 19 additions and 3 deletions
|
|
@ -20,7 +20,8 @@ RUN wget -O - http://media.steampowered.com/client/steamcmd_linux.tar.gz | tar -
|
|||
ADD ./tf2_ds.txt $SERVER/tf2_ds.txt
|
||||
ADD ./update.sh $SERVER/update.sh
|
||||
ADD ./tf.sh $SERVER/tf.sh
|
||||
RUN $SERVER/update.sh
|
||||
ADD ./clean.sh $SERVER/clean.sh
|
||||
RUN $SERVER/update.sh && $SERVER/clean.sh
|
||||
|
||||
EXPOSE 27015/udp
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,13 @@ Basic Team Fortress 2 server
|
|||
docker pull spiretf/docker-tf2-server
|
||||
```
|
||||
|
||||
### Maps ###
|
||||
|
||||
In order to reduce the image size this image has most of the maps removed, you'll probably want to add aditional maps to a derived image, install [mapdownloader](https://github.com/spiretf/mapdownloader) or use [spiretf/docker-comp-server](https://hub.docker.com/r/spiretf/docker-comp-server) (comes with mapdownloader) instead.
|
||||
|
||||
### Details:
|
||||
By default image is build with enabled autoupdate feature (take a look at `tf.sh` file).
|
||||
You can create new Dockerfile based on that image (FROM tf2) and customize it with plugins, configs, CMD and ENTRYPOINT instructions.
|
||||
You can create new Dockerfile based on that image (FROM spiretf/docker-tf2-server) and customize it with plugins, configs, CMD and ENTRYPOINT instructions.
|
||||
|
||||
|
||||
```shell
|
||||
|
|
@ -16,7 +20,7 @@ You can create new Dockerfile based on that image (FROM tf2) and customize it wi
|
|||
docker run -d -p 27015:27015/udp spiretf/docker-tf2-server
|
||||
|
||||
# Run image with custom options
|
||||
docker run -d -p 27015:27015/udp spiretf/docker-tf2-server +sv_pure 2 +map ctf_2fort.bsp +maxplayers 32
|
||||
docker run -d -p 27015:27015/udp spiretf/docker-tf2-server +sv_pure 2 +map pl_badwater.bsp +maxplayers 32
|
||||
|
||||
# Run image with custom config
|
||||
docker run -d -p 27015:27015/udp -v ~/server.cfg:/home/tf2/hlserver/tf2/tf/cfg/server.cfg:ro spiretf/docker-tf2-server
|
||||
|
|
|
|||
11
clean.sh
Executable file
11
clean.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash
|
||||
|
||||
cd $SERVER/tf2/tf/maps
|
||||
|
||||
MAPS_KEEP=("cp_badlands.bsp" "cp_gravelpit.bsp" "cp_granary.bsp" "cp_gullywash_final1.bsp" "cp_process_final.bsp" "cp_snakewater_final1.bsp" "cp_steel.bsp" "koth_lakeside_final.bsp" "pl_badwater.bsp" "pl_borneo.bsp" "pl_upward.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[@]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue