[Docker] btSync based off Ubuntu (need help)


Recommended Posts

Hi all,

 

I'm putting some hours into understand Docker today and have set my sights on getting a BitTorrent Sync docker container actually working. I have built a container successfully which is now running but there is one piece of my understanding which does not yet compute. Networking.

 

root@unRAID:/mnt/cache# docker run -p 8888:8888 -p 55555:55555 -v /mnt/cache/btsync-docker/:/btsync/ btsync
By using this application, you agree to our Privacy Policy and Terms.
http://www.bittorrent.com/legal/privacy
http://www.bittorrent.com/legal/terms-of-use

total physical memory 536870912 max disk cache 2097152
Using IP address 172.17.0.3
UPnP: Could not map UPnP Port on this pass, retrying.
UPnP: Could not map UPnP Port on this pass, retrying.
UPnP: Could not map UPnP Port on this pass, retrying.
UPnP: Unable to map port 172.17.0.3:55555 with UPnP.

 

In virtualisation I just have a br0 that I connect via, but how does it work in Docker? 172.x.x.x isn't right surely?

 

Ideas, help, explanation welcomed please. I'll post a working Dockerfile at the end of this when it's all working.  8)

Link to comment

Hi all,

 

I'm putting some hours into understand Docker today and have set my sights on getting a BitTorrent Sync docker container actually working. I have built a container successfully which is now running but there is one piece of my understanding which does not yet compute. Networking.

 

root@unRAID:/mnt/cache# docker run -p 8888:8888 -p 55555:55555 -v /mnt/cache/btsync-docker/:/btsync/ btsync
By using this application, you agree to our Privacy Policy and Terms.
http://www.bittorrent.com/legal/privacy
http://www.bittorrent.com/legal/terms-of-use

total physical memory 536870912 max disk cache 2097152
Using IP address 172.17.0.3
UPnP: Could not map UPnP Port on this pass, retrying.
UPnP: Could not map UPnP Port on this pass, retrying.
UPnP: Could not map UPnP Port on this pass, retrying.
UPnP: Unable to map port 172.17.0.3:55555 with UPnP.

 

In virtualisation I just have a br0 that I connect via, but how does it work in Docker? 172.x.x.x isn't right surely?

 

Ideas, help, explanation welcomed please. I'll post a working Dockerfile at the end of this when it's all working.  8)

 

It will not pass NAT-PMP packages unless you bridge the container to the host adapter. Use --net="host" instead of -h HOSTNAME.

 

Link to comment

Ok thanks, that seems to be working just fine with the --net="host" stuff.

 

Any idea why when I restart the container it looses any and all changes made during the last 'run' of the container?

 

EDIT: Answered my own question, I need to commit the changes to the docker image otherwise it just creates a new container based off the old image when I issue the 'run' command.

 

Next Q, how do I set (on a per container basis) that changes are committed when stopping a container?

 

EDIT2: Answered my own question again. Rather than storing any information in the container at all (be it a database, conf file or whatever) you should actually store this in unRAID and then 'passthrough' that directory to the container using -v flag in the run command.

 

docker run -p 8888:8888 -p 55555:55555 -v /mnt/cache/btsync-docker/:/btsync/ -v /mnt/user/Media/:/mnt/unraid/  --net="host" -d btsync

 

In the above docker run command note the two -v flags. The first is where I store the docker .conf files and sync data and then pass that through to the container and it appears in the containers filesystem under /btsync. The second is passing my array through which appears under /mnt/unraid.

 

This docker stuff is pretty neat I have to say. Headless Linux VMs are done.

Link to comment

Everytime you issue the run command it's a brand new container. I just create a named container and issue a start and stop command thereafter instead of issuing a run command everytime.

 

How'd you do that then? You can see from my edit above the lengthy docker run command I'm issuing everytime.

Link to comment

It might be worth setting up a wiki for these containers.  Or setup forums similar to xbmc skins where each major container has a sub forum, or at least a dedicated named thread.

 

It's already a tad difficult trying yo keep track of all the differing containers unraiders have made

Link to comment

Everytime you issue the run command it's a brand new container. I just create a named container and issue a start and stop command thereafter instead of issuing a run command everytime.

 

How'd you do that then? You can see from my edit above the lengthy docker run command I'm issuing everytime.

I don't think they correctly estimated the adoption rate of Docker and probably thought KVM was where the heat was.

Link to comment

Well, docker is interesting and is great for people who want plugins and who don't want to deal with VMs.

 

The people who do want VMs like me pretty much already set up one in Xen and switching over is kind of a pain.

 

I guess the population that really wanted kvm are the people who had pass through issues in xen.

 

I don't pass anything through and I'm perfectly happy with my Ubuntu running in xen

 

Although I'm tempted to try docker, I think I'll wait for a while because for one xen meets all my needs and more, and docker even as a concept is a little over a year old. I'd rather not be the one trying to work out the kinks of a new system when i don't really need it.

Link to comment

...and docker even as a concept is a little over a year old. I'd rather not be the one trying to work out the kinks of a new system when i don't really need it.

 

To be fair this is a little misleading.

 

Docker leverages LXC which has been out there  for at least 5 years. Containers are nothing new, just easy to use containers with a community around it is.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.