feat: add github action for docker build on release (#132)

* feat: add github action
Add github action for auto build slim torrverser alpine image with ffmpeg for linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le platforms

* build: move creating dirs and files to entrypoint

* fix: remove linux/386 and linux/ppc64le from docker building

* fix: update readme with docker info
This commit is contained in:
Aleksej
2022-01-20 01:23:40 +02:00
committed by GitHub
parent 0603008dfe
commit b0c6730078
5 changed files with 161 additions and 7 deletions

22
docker-entrypoint.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
FLAGS="--path $TS_CONF_PATH --logpath $TS_LOG_PATH --port $TS_PORT --torrentsdir $TS_TORR_DIR"
if [[ -n "$TS_HTTPAUTH" ]]; then FLAGS="${FLAGS} --httpauth"; fi
if [[ -n "$TS_RDB" ]]; then FLAGS="${FLAGS} --rdb"; fi
if [[ -n "$TS_DONTKILL" ]]; then FLAGS="${FLAGS} --dontkill"; fi
if [ ! -d $TS_CONF_PATH ]; then
mkdir -p $TS_CONF_PATH
fi
if [ ! -d $TS_TORR_DIR ]; then
mkdir -p $TS_TORR_DIR
fi
if [ ! -f $TS_LOG_PATH ]; then
touch $TS_LOG_PATH
fi
echo "Running with: ${FLAGS}"
torrserver $FLAGS