Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ achieve by mounting it as a volume: `-v /path/to/some/host/disk:/data`

```bash
docker run \
--cap_add=SYS_ADMIN \
--name btsync-nfs \
bootstrap SECRET_HERE some-third-party-image

Expand All @@ -75,6 +76,7 @@ docker run \
# replacing entrypoint and command. (Advanced users)
docker run \
--name some-third-party-image \
--cap_add=SYS_ADMIN \
-e CONTAINER_DATA_PATH=/container/data/path \
--entrypoint /bin/sh \
some-third-party-image: latest \
Expand All @@ -91,6 +93,7 @@ mount -t nfs4 btsync.link.or.ip:/yolo /path/to/mount/on

```bash
docker run \
--cap_add=SYS_ADMIN \
--name btsync \
cusspvz/btsync:latest
```
Expand Down Expand Up @@ -210,6 +213,16 @@ Defaults to: 1000
### GID
Defaults to: 1000

## docker-compose

We also provide a docker-compose file as example.
Instead running container in privileged mode, we opted for running with flag `cap_add=SYS_ADMIN` which is sufficient for performing mount and umount operations
inside container.
If you need more informations about capabilities take a look at:

Docker [documentation](https://docs.docker.com/engine/reference/run/)
Linux man [page](http://linux.die.net/man/7/capabilities) about capabilities levels

## Development

##### build and run a container
Expand Down
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
btsync:
restart: always
image: cusspvz/btsync:2.0.1
cap_add:
- SYS_ADMIN
command:
- bootstrap
- A2R52BNYBKUXXQXCS76QCUPX3HGFJGGZT
- test
stdin_open: true

ubuntu:
restart: always
image: ubuntu:latest
cap_add:
- SYS_ADMIN
command:
- apt-get -y -qq update; apt-get install -y -qq nfs-common; mount -t nfs4 nfs-server:/test /mnt; cat
stdin_open: true
links:
- btsync:nfs-server