Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokaixuan committed Jan 25, 2021
0 parents commit a9e7eca
Show file tree
Hide file tree
Showing 12 changed files with 249 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM debian:stable-slim as builder

ENV DEBIAN_FRONTEND=noninteractive VERSION=2.7.2

RUN apt-get update; \
apt-get install -y wget 2>/dev/null && \
wget -qO- https://github.com/xiaokaixuan/rslsync/releases/download/v${VERSION}/rslsync_linux_amd64.tar.gz | tar zx -C / && \
chmod a+x /rslsync /run_sync

FROM debian:stable-slim

COPY --from=builder /rslsync /run_sync /usr/bin/
COPY --from=builder /sync.conf.default /etc/

EXPOSE 8888/tcp 55555/tcp 55555/udp

VOLUME [/sync_data]

ENTRYPOINT ["run_sync"]

CMD ["--config", "/sync_data/sync.conf"]
21 changes: 21 additions & 0 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM debian:stable-slim as builder

ENV DEBIAN_FRONTEND=noninteractive VERSION=2.7.2

RUN apt-get update; \
apt-get install -y wget 2>/dev/null && \
wget -qO- https://github.com/xiaokaixuan/rslsync/releases/download/v${VERSION}/rslsync_linux_arm64.tar.gz | tar zx -C / && \
chmod a+x /rslsync /run_sync

FROM arm64v8/debian:stable-slim

COPY --from=builder /rslsync /run_sync /usr/bin/
COPY --from=builder /sync.conf.default /etc/

EXPOSE 8888/tcp 55555/tcp 55555/udp

VOLUME [/sync_data]

ENTRYPOINT ["run_sync"]

CMD ["--config", "/sync_data/sync.conf"]
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Resilio Sync

### Build
```bash
docker build -t xiaokaixuan/rslsync:amd64 .
docker build -t xiaokaixuan/rslsync:arm64 -f Dockerfile.arm64 .
docker push xiaokaixuan/rslsync:amd64
docker push xiaokaixuan/rslsync:arm64

docker manifest create xiaokaixuan/rslsync xiaokaixuan/rslsync:amd64 xiaokaixuan/rslsync:arm64 --amend
docker manifest push xiaokaixuan/rslsync
```

### Usage

```bash
docker run -d --name sync --restart=always \
-v ~/sync_data:/sync_data -p8888:8888 -p55555:55555 -p55555:55555/udp xiaokaixuan/rslsync
```

### Docker Hub
> *https://hub.docker.com/r/xiaokaixuan/rslsync*
8 changes: 8 additions & 0 deletions filebrowser/.docker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"port": 80,
"baseURL": "",
"address": "",
"log": "stdout",
"database": "/database.db",
"root": "/srv"
}
19 changes: 19 additions & 0 deletions filebrowser/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM alpine:latest as builder

ENV VERSION=2.11.0

RUN apk --update add wget; \
wget -qO- https://github.com/filebrowser/filebrowser/releases/download/v${VERSION}/linux-amd64-filebrowser.tar.gz | tar zx -C / filebrowser

FROM alpine:latest

RUN apk --update add ca-certificates mailcap

VOLUME /srv
EXPOSE 80

COPY .docker.json /.filebrowser.json
COPY --from=builder /filebrowser /filebrowser

ENTRYPOINT ["/filebrowser"]

22 changes: 22 additions & 0 deletions filebrowser/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM alpine:latest as builder

ENV VERSION=2.11.0

RUN apk --update add wget; \
wget -qO- https://github.com/filebrowser/filebrowser/releases/download/v${VERSION}/linux-arm64-filebrowser.tar.gz | tar zx -C / filebrowser

FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
FROM arm64v8/alpine:latest

COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin

RUN apk --update add ca-certificates mailcap

VOLUME /srv
EXPOSE 80

COPY .docker.json /.filebrowser.json
COPY --from=builder /filebrowser /filebrowser

ENTRYPOINT ["/filebrowser"]

28 changes: 28 additions & 0 deletions filebrowser/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## File Browser

### Support arm64
```bash
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```

### Build
```bash
docker build -t xiaokaixuan/filebrowser:amd64 .
docker build -t xiaokaixuan/filebrowser:arm64 -f Dockerfile.arm64 .
docker push xiaokaixuan/filebrowser:amd64
docker push xiaokaixuan/filebrowser:arm64

docker manifest create xiaokaixuan/filebrowser xiaokaixuan/filebrowser:amd64 xiaokaixuan/filebrowser:arm64 --amend
docker manifest push xiaokaixuan/filebrowser
```

### Usage

```bash
docker run -d --name filebrowser \
--restart always -v /path/to/root:/srv -p80:80 xiaokaixuan/filebrowser
```

### Docker Hub
> *https://hub.docker.com/r/xiaokaixuan/filebrowser*
24 changes: 24 additions & 0 deletions qbittorrent_ee/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM alpine:latest as builder

ENV VERSION=4.3.2.10

ADD service /service

RUN find /service -type f -name run -exec chmod a+x {} \;; \
apk --update add wget && \
wget -q https://github.com/c0re100/qBittorrent-Enhanced-Edition/releases/download/release-${VERSION}/qbittorrent-nox_x86_64-linux-musl_static.zip && \
unzip qbittorrent-nox_x86_64-linux-musl_static.zip -d / && \
chmod a+x /qbittorrent-nox

FROM alpine:latest

RUN apk add --no-cache --update runit

COPY --from=builder /service /service
COPY --from=builder /qbittorrent-nox /qbittorrent-nox

EXPOSE 6881 6881/udp 8080

VOLUME /config /downloads

ENTRYPOINT ["runsvdir", "/service"]
26 changes: 26 additions & 0 deletions qbittorrent_ee/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM alpine:latest as builder

ENV VERSION=4.3.2.10

ADD service /service

RUN find /service -type f -name run -exec chmod a+x {} \;; \
apk --update add wget && \
wget -q https://github.com/c0re100/qBittorrent-Enhanced-Edition/releases/download/release-${VERSION}/qbittorrent-nox_aarch64-linux-musl_static.zip && \
unzip qbittorrent-nox_aarch64-linux-musl_static.zip -d / && \
chmod a+x /qbittorrent-nox

FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
FROM arm64v8/alpine:latest

COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
RUN apk add --no-cache --update runit

COPY --from=builder /service /service
COPY --from=builder /qbittorrent-nox /qbittorrent-nox

EXPOSE 6881 6881/udp 8080

VOLUME /config /downloads

ENTRYPOINT ["runsvdir", "/service"]
29 changes: 29 additions & 0 deletions qbittorrent_ee/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## qBittorrent Enhanced Edition

### Support arm64
```bash
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```

### Build
```bash
docker build -t xiaokaixuan/qbittorrent_ee:amd64 .
docker build -t xiaokaixuan/qbittorrent_ee:arm64 -f Dockerfile.arm64 .
docker push xiaokaixuan/qbittorrent_ee:amd64
docker push xiaokaixuan/qbittorrent_ee:arm64

docker manifest create xiaokaixuan/qbittorrent_ee xiaokaixuan/qbittorrent_ee:amd64 xiaokaixuan/qbittorrent_ee:arm64 --amend
docker manifest push xiaokaixuan/qbittorrent_ee
```

### Usage

```bash
docker run -d --name qbittorrent \
-e WEBUI_PORT=8080 --restart always \
-p 6881:6881 -p 6881:6881/udp -p 8080:8080 \
-v /path/to/config:/config -v /path/to/downloads:/downloads xiaokaixuan/qbittorrent_ee
```

### Docker Hub
> *https://hub.docker.com/r/xiaokaixuan/qbittorrent_ee*
15 changes: 15 additions & 0 deletions qbittorrent_ee/service/qbittorrent/qBittorrent.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[AutoRun]
enabled=false
program=

[LegalNotice]
Accepted=true

[Preferences]
Connection\UPnP=false
Connection\PortRangeMin=6881
Downloads\SavePath=/downloads/
Downloads\ScanDirsV2=@Variant(\0\0\0\x1c\0\0\0\0)
Downloads\TempPath=/downloads/incomplete/
WebUI\Address=*
WebUI\ServerDomains=*
13 changes: 13 additions & 0 deletions qbittorrent_ee/service/qbittorrent/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

mkdir -p /config/qBittorrent /downloads

[ ! -e /config/qBittorrent/qBittorrent.conf ] && cp /service/qbittorrent/qBittorrent.conf /config/qBittorrent/qBittorrent.conf

WEBUI_PORT=${WEBUI_PORT:-8080}

umask 0

export HOME="/config" XDG_CONFIG_HOME="/config" XDG_DATA_HOME="/config"

exec /qbittorrent-nox --webui-port=${WEBUI_PORT}

0 comments on commit a9e7eca

Please sign in to comment.