Any of you use Docker?

9 risposte [Ultimo contenuto]
t3g
t3g
Offline
Iscritto: 05/15/2011

Docker has been gaining a lot of hype recently for being an OS container much like BSD Jails. Ubuntu 14.04 includes it in the repos so therefore Trisquel 7 does as well: http://mirror.fsf.org/trisquel/pool/main/d/docker.io/

I've used VirtualBox in the past and while its GPL, it pushes you to install a non-free extensions pack. I've also noticed that Ubuntu 14.04 includes VB in the non-free multiverse repo with the extensions pack included.

I haven't used Docker a whole lot but it does seem interesting. They also offer an official repo with up to date packages with support for older Ubuntus/Trisquels at http://docker.io

Anyone used this and had good experiences?

Darksoul71
Offline
Iscritto: 01/04/2012

I haven't spent any time playing around with Docker but experimented with Vagrant plus Virtual Box.

You need to understand that Docker is NOT any container-solution similar to OpenVZ, LXC, Jails, etc.

It's more like a layer between some container virtualisation or something like Vagrant plus VBox and the outer world. It enables you to use the virtualisation technology below to encapsulate your server / application. Then you can upload your server / application to some "repository" and spawn it everywhere (physical remote server, local host, clound).

Have a closer look here:
http://docs.docker.io/introduction/technology/#introduction

You can also use LXC for Docker as far as I understood from the few presentations I have watched on youtube.

Darksoul71
Offline
Iscritto: 01/04/2012

Oh yes, one thing I forgot to mention:
Similar to other "enterprise" solutions Docker does not seem to make sense to me if you use it on the small scale. For setting up VMs / containers on your local PC there are simpler solutions with a less steep learing curve and less demanding infrastructure (e.g. local "registry"). One can easily set up a VM / container with a SSH-key that allows remote login without passwort. If you set up the VM with a static IP in the first place, you can easily spawm multiple copies of the VM, start the VM, update the VM, assign another IP, etc.

The same applies to containers (OpenVZ, LXC) of course. Automating system setup is not really complicate and can be done with simple scripts (Bash, Python, Perl, etc).

Darksoul71
Offline
Iscritto: 01/04/2012

@t3g: Uhm...hello ? Any feedback ?
Well, in the first place I suggest you play around a bit with Vagrant and VirtualBox.

Docker seems to either relate on Vagrant / VBox or LXC as base altough I imagine that also other container solutions such as OpenVZ should do although they rely on a special kernel.

t3g
t3g
Offline
Iscritto: 05/15/2011

Sorry for the late response.

I've heard the way to go is LXC, but I haven't tested yet as I am waiting for a bigger hard drive. I do want to give it more of a chance down the road, especially with Trisquel 7.

Darksoul71
Offline
Iscritto: 01/04/2012

No problem ! I was just wondering !

BTW: Docker is really straight forward to use.

I came across the Docker cheat sheet:
https://coderwall.com/p/2es5jw

It gives at least some ideas how to use docker. Also the standard documentation is quite good.
Just have a look over at https://www.docker.io/

It took me only 15 minutes (following a small howto) to install and use Docker on the scrap PC I have currently standing around with Kanotix installed. Since this is based on Debian, Docker should be straight forward to use on Trisquel.

I guess using LXC as backend is good since it is integrated into the standard kernel. Exposing services inside a docker container seems a bit clumsy to me with port forwarding but as I understood you can use LXC with network bridges as well.

OpenVZ is a bit easier for me here since you can simply specify an IP which is part of the subnet of the host and thus directly expose the services on the container. The big hassle for OpenVZ is though that it does not integrate into the standard kernel and you always have to run a special kernel (e.g. like ProxMox).

One thing you should consider: Docker aims for really big scale environments. So even when you use it for small scale environments, you need to configure everything. For really small scale usage (e.g. running a wiki inside a container for personal use, experimenting with some selfwritten network services) you might possibly be better of by using LXC directly.
Although solutions such as Vagrant or Docker have the big benefit that they integrate automated setup of containers which means reproducable results.

t3g
t3g
Offline
Iscritto: 05/15/2011

Cool, thanks for the info. I don't know if Ubuntu (and therefore trickle down to Trisquel) is going to keep up to date with Docker in the official 14.04 repos, but I may end up playing with that version or grab via the official repos via http://docs.docker.io/installation/ubuntulinux/

There's a lot on my plate these days, but I look forward to giving Docker a try! :-)

Darksoul71
Offline
Iscritto: 01/04/2012

Well, when it comes to down to docker the technical base seems either to be LXC or Virtual Box / Vagrant. So if the Ubuntu "base version" used for Trisquel Version X supports LXC, Trisquel should support Docker as well.

From the typical use case perspective speaking one must ask himself if Docker is oversized, since LXC is really nice. Docker adds a lot of features but also a lot of overhead.

Legimet
Offline
Iscritto: 12/10/2013

Virtualbox has a nonfree build dependency. Also it has bad performance compared to KVM and requires an external kernel module which doesn't build on some kernel versions. Vagrant has a plugin to work with KVM.

Darksoul71
Offline
Iscritto: 01/04/2012

I am not shure how your information helps here. To my understanding the combination of Vagrant / VBox is only used by Docker under MacOS where something like LXC or OpenVZ is not available. I guess KVM will not help here as well.

For GNU Linux one can relax and use the free and into the kernel integrated LXC.