From c9a43d22a6e582fa3924aed800602d87a5e5bd16 Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 14 Apr 2016 11:19:08 +0800 Subject: [PATCH] add btsync --- btsync/Dockerfile | 25 +++++++++++++++++++++++++ btsync/README.md | 7 +++++++ btsync/config.json | 13 +++++++++++++ btsync/docker-compose.yml | 8 ++++++++ 4 files changed, 53 insertions(+) create mode 100644 btsync/Dockerfile create mode 100644 btsync/README.md create mode 100644 btsync/config.json create mode 100644 btsync/docker-compose.yml diff --git a/btsync/Dockerfile b/btsync/Dockerfile new file mode 100644 index 0000000..6ccab32 --- /dev/null +++ b/btsync/Dockerfile @@ -0,0 +1,25 @@ +# +# Dockerfile for btsync +# + +FROM debian +MAINTAINER kev + +RUN set -xe \ + && apt-get update \ + && apt-get install -y curl \ + && curl -sSL https://download-cdn.getsync.com/stable/linux-x64/BitTorrent-Sync_x64.tar.gz | tar xz -C /usr/bin/ btsync \ + && apt-get purge -y --auto-remove curl \ + && rm -rf /var/lib/apt/lists/* + +COPY config.json /etc/btsync/ + +ENV STORAGE_PATH /data/.syncsystem +ENV DIRECTORY_ROOT /data/syncaod + +VOLUME /etc/btsync /data +EXPOSE 8888 55555 + +CMD set -xe \ + && mkdir -p "$STORAGE_PATH" "$DIRECTORY_ROOT" \ + && btsync --nodaemon --config /etc/btsync/config.json diff --git a/btsync/README.md b/btsync/README.md new file mode 100644 index 0000000..c249570 --- /dev/null +++ b/btsync/README.md @@ -0,0 +1,7 @@ +btsync +====== + +[BitTorrent Sync][1] is a fast, simple, and secure file syncing for IT and individuals. + + +[1]: https://www.getsync.com/ diff --git a/btsync/config.json b/btsync/config.json new file mode 100644 index 0000000..8357fcb --- /dev/null +++ b/btsync/config.json @@ -0,0 +1,13 @@ +{ + "device_name": "BitTorrent Sync Server", + "listening_port": 55555, + "storage_path": "/data/.syncsystem", + "pid_file": "/data/.syncsystem/btsync.pid", + "use_upnp": false, + "download_limit": 0, + "upload_limit": 0, + "webui": { + "listen": "0.0.0.0:8888", + "directory_root": "/data/syncaod" + } +} diff --git a/btsync/docker-compose.yml b/btsync/docker-compose.yml new file mode 100644 index 0000000..fae38c8 --- /dev/null +++ b/btsync/docker-compose.yml @@ -0,0 +1,8 @@ +btsync: + image: vimagick/btsync + ports: + - "8888:8888" + - "55555:55555" + volumes: + - ./data:/data + restart: always