mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 14:06:09 +05:00
add docker lite
This commit is contained in:
9
docker/lite/Dockerfile
Normal file
9
docker/lite/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM debian:bookworm-slim as builder
|
||||
RUN mkdir /src
|
||||
COPY ./ /src
|
||||
RUN /src/cp.sh
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /app/TorrServer /
|
||||
WORKDIR /
|
||||
ENTRYPOINT [ "/TorrServer" ]
|
||||
30
docker/lite/README.md
Normal file
30
docker/lite/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
## TorrServer
|
||||
|
||||
A lightweight container that contains a single TorrServer file
|
||||
|
||||
Source code: https://github.com/YouROK/TorrServer
|
||||
|
||||
--------
|
||||
|
||||
### Support platforms
|
||||
* TorrServer-linux-386
|
||||
* TorrServer-linux-amd64
|
||||
* TorrServer-linux-arm5
|
||||
* TorrServer-linux-arm64
|
||||
* TorrServer-linux-arm7
|
||||
|
||||
--------
|
||||
### Docker run example
|
||||
```
|
||||
docker run -p 8090:8090 yourok/torrlite:TAG [ ARGS ]
|
||||
```
|
||||
|
||||
TAG - tag of version in docker hub eg MatriX.134 \
|
||||
ARGS - args of torrserver
|
||||
|
||||
You can mount a directory like -v /your/local/path/:/cfg and write logs etc there
|
||||
|
||||
Example of run with args:
|
||||
```
|
||||
docker run -p 8099:8099 yourok/torrlite:MatriX.134 --port=8099
|
||||
```
|
||||
17
docker/lite/cp.sh
Executable file
17
docker/lite/cp.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
case $(uname -m) in
|
||||
i386) architecture="386" ;;
|
||||
i686) architecture="386" ;;
|
||||
x86_64) architecture="amd64" ;;
|
||||
aarch64) architecture="arm64" ;;
|
||||
armv7|armv7l) architecture="arm7" ;;
|
||||
armv6|armv6l) architecture="arm5" ;;
|
||||
# armv5|armv5l) architecture="arm5" ;;
|
||||
*) echo "Unsupported Arch. Can't continue."; exit 1 ;;
|
||||
esac
|
||||
|
||||
binName="TorrServer-linux-${architecture}"
|
||||
mkdir -p /app
|
||||
|
||||
cp /src/dist/$binName /app/TorrServer
|
||||
4
docker/lite/makedocker.sh
Executable file
4
docker/lite/makedocker.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
cp -r ../../dist ./
|
||||
docker buildx build --platform "linux/386,linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6" --tag yourok/torrlite:$* --push .
|
||||
rm -rf ./dist
|
||||
Reference in New Issue
Block a user