Giter Club home page Giter Club logo

btsync-arm's Introduction

Dockerized BTSync

A Docker image you can use to quickly sync folders using BTSync. (http://www.bittorrent.com/sync)

How to use

Pull the Docker image

docker pull aduermael/btsync

If Docker is not installed: https://docs.docker.com/installation/

Run the container

docker run -t -i -d -p 55555:55555 aduermael/btsync

If you want to sync folders from your host or Docker volumes, be sure to mount them when running the container. Unfortunately this can't be done later (yet).

  • Mount folders from your own host:

    docker run -t -i -d -p 55555:55555 -v [host-dir]:[container-dir] aduermael/btsync

    This will mount the host directory, [host-dir] (path), into the container at [container-dir] (path).

  • Mount folders from Docker volumes

    docker run -t -i -d -p 55555:55555 --volumes-from [container-name] aduermael/btsync

    This will mount all volumes (folders) from the given container ( [container-name] )

IF you already have a BTSync secret key

If you already have a secret key you can quickly synchronize your folder when running the container:

docker run -t -i -d -p 55555:55555 aduermael/btsync [container-dir][secret-key]

[container-dir]: Absolute path to the directory (inside the container).

[secret-key]: A secret key associated with a synchronized folder. You can sync a folder using a BitTorrent Sync client: http://www.bittorrent.com/sync. (you can use a read-only key)

Sync / disconnect folders

Use attach command to interact with your btsync running container.

docker attach [container-name]
  • When running the container, you can assign a name with --name option:

    docker run -t -i -d -p 55555:55555 --name btsync aduermael/btsync
  • If you did not assign a name, use docker ps the one that was generated:

    $ docker ps
    CONTAINER ID        IMAGE                     COMMAND                CREATED             STATUS              PORTS                      NAMES
    aef963c15535        aduermael/btsync:latest   /bin/bash ./start.sh   6 minutes ago       Up 6 minutes        0.0.0.0:55555->55555/tcp   btsync

Commands

When you attach to this container, you can use different commands to sync or disconnect folders.

Commands: {folders|add-folder|remove-folder|detach|clear|help|ls|cd|mkdir|rm}
>
  • folders List folders and respective BTSync keys.

  • add-folder [dir] [btsync-key]*

    • [dir] folder's absolute path
    • [btsync-key] (optional)* Will be generated if not provided
    > add-folder /SYNC/test

Added /SYNC/test secret: AO5ACOUNYHDHI5PE4NHLRMAWAQPMNV7T read-only: RIJK3SFTY2K73XNDDAEF5BNWS4BCCSI5 ```

  • remove-folder [dir]

    • [dir] folder's absolute path
    > remove-folder /SYNC/test

Removed /SYNC/test ```

Detach

To detach from the container, use the escape sequence Ctrl-p + Ctrl-q

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.