News for hackers. Stuff that matters.
Re:Docker can now run within Docker by pearjuice on Thursday September 05, 2013 @06:08PM (#6337431)
I remember running VMs in VMs when I was younger and wondered how far I could go before my computer would implode. Infinite recursion is amazing. Let me rephrase that; infinity is amazing.
Re:Docker can now run within Docker by null_ptr on Thursday September 05, 2013 @08:10PM (#6337988)
How far did you get? :-)
Re:Docker can now run within Docker by pearjuice on Friday September 06, 2013 @05:12AM (#6339415)
After three to four iterations (cannot remember precisely) I couldn't split up my computer its capacities any further to qualify for any decent OS its specifications which could run another VM. Please note that this was years ago, I suggest you should try it!

Unless you want to waste a lot of time installing the nested OS's, like I did, I suggest using pre-installed images you can throw right in.

Re:Docker can now run within Docker by kozhevnikov on Friday September 06, 2013 @05:03AM (#6339392)
To infinity and beyond.
Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @01:25PM (#6335492)
This is one of the many potential applications of the new "-privileged" flag of Docker. This is very exciting, because it means that we will soon run Docker CI within Docker itself (instead of ad-hoc VMs), among other things!
Re:Docker can now run within Docker by andrewmunsell on Thursday September 05, 2013 @02:18PM (#6335849)
The big thing for me about the privileged flag is the ability to run VPN software on the containers-- this way, they can talk to each other cross-physical-machine as well as between containers on the same host.
Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @02:22PM (#6335883)
We're on the same page. That's my next hack — an OpenVPN server within Docker. The blog post, Dockerfile, and helper scripts should be out next week :-)
Re:Docker can now run within Docker by andrewmunsell on Thursday September 05, 2013 @02:51PM (#6336063)
Great, looking forward to seeing it.

My system uses peer to peer software to synchronize each container's public keys and IP address/port information, as well as a mesh network VPN. This allows me to easily join a new node to the VPN cluster (using ENV variables to specify the port and public address to listen on, which is then used in the Docker container creation) and still have minimal latency between any two nodes.

I'll probably have to write up a post myself describing the system and how Docker is used to create new containers and add it to the cluster.

Re:Docker can now run within Docker by gcr on Thursday September 05, 2013 @09:53PM (#6338257)
Whoa. That's really cool. What do you use that for?

Also: does openVPN drive your "mesh network VPN"? i thought it was only client<-->server!

Re:Docker can now run within Docker by andrewmunsell on Friday September 06, 2013 @01:16AM (#6338808)
OpenVPN is only client-server, so I'm currently using tinc[1]. BitTorrent Sync is the software used to synchronize the actual public keys and container IP addresses.

[1]: http://www.tinc-vpn.org/

Re:Docker can now run within Docker by contingencies on Thursday September 05, 2013 @01:53PM (#6335684)
To be fair this is a standard feature of Linux Control Groups that's existed for years now. For more info on how that works, see https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @01:59PM (#6335718)
Cgroups and namespaces. Even though some namespaces are nested (typically, the PID namespace) why others don't need to be.

There is nothing special with nesting cgroups and namespaces from the kernel point of view. The interesting part is to work around the little details (as anybody who ran nested LXC containers will know) :-)

[deleted]
Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @02:02PM (#6335739)
Yes, you can do that; I would personally ship the containers separately and provide minimal orchestration. Why? Because if you bundle multiple containers together, they will run on a single host. And if they run on a single host, it's generally easy enough to craft your own ad hoc orchestration.

But if you have multiple containers that require really weird, specific hoops to run together, it's definitely an option!

Re:Docker can now run within Docker by shykes on Thursday September 05, 2013 @02:05PM (#6335759)
Note that future versions of Docker will let you ship and manipulate a group of containers as a single object. Currently this is scheduled for 0.8 (October release).
Re:Docker can now run within Docker by tlrobinson on Thursday September 05, 2013 @01:58PM (#6335714)
Mostly-unrelated question: could one build a desktop Linux distribution around Docker? Or rather, how difficult would it be? I assume OS X's application sandboxing uses a technology similar to LXC.
Re:Docker can now run within Docker by wmf on Thursday September 05, 2013 @02:56PM (#6336105)
Some people are working in that direction, see https://people.gnome.org/~alexl/glick2/ and http://lwn.net/Articles/562138/ Because this stuff is older than Docker it tends to be Dockerish but not actually Docker.
Re:Docker can now run within Docker by joffreyf on Thursday September 05, 2013 @02:16PM (#6335838)
You might be looking for something akin to http://coreos.com/ !
Re:Docker can now run within Docker by tlrobinson on Thursday September 05, 2013 @02:34PM (#6335953)
CoreOS could be a good starting point, but it's intended for servers so it's very bare bones (and the service discovery stuff might not make much sense)
Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @02:57PM (#6336112)
Depends what you have in mind, I guess.

You could run most essential system components (syslog, ssh, cron...) inside containers, and bind-mount /home when it makes sense. Since those components need elevated privileges, I don't know if containers would be that useful... And then systemd already puts services in cgroups; it's a nice approach (IMHO).

Or you could use containers a bit like virtualenvs. If you're a Python developer familiar with virtualenvwrapper, you probably use mkvirtualenv when you start working on a new project (or on a different setup for an existing project). Containers could be used in a similar manner with some clever wrappers.

Re:Docker can now run within Docker by songgao on Thursday September 05, 2013 @03:16PM (#6336247)
Another feature liberated by `-privilege ` that I like a lot is ability to run `mknod`, which is necessary for using TUN/TAP interface.
Re:Docker can now run within Docker by tachion on Friday September 06, 2013 @03:47AM (#6339198)
It is nice to see, especially because fast moving project is always an enjoyable thing to observer. As a sidenote, to increase overall awareness, FreeBSD has capability for hierarchical Jails (Jails inside of Jails) for a while.
Re:Docker can now run within Docker by outside1234 on Thursday September 05, 2013 @05:39PM (#6337246)
Does anyone know if there are plans for when docker will be able to run in 32-bit?
Re:Docker can now run within Docker by dsissitka on Thursday September 05, 2013 @06:26PM (#6337515)
It'll work now if you remove this if block...

https://github.com/dotcloud/docker/blob/master/server.go#L12...

...and create your own images.

It's unsupported, but it'll work.

Re:Docker can now run within Docker by segeek on Thursday September 05, 2013 @03:04PM (#6336168)
Very nice!

One thing that I am looking forward to is Docker support for Windows. Would really like to see that feature.

Re:Docker can now run within Docker by yebyen on Thursday September 05, 2013 @03:16PM (#6336252)
There is Docker within Vagrant, I have a Windows 7 desktop in front of me and all I need to do to enter my CoreOS system is "vagrant up; vagrant ssh" from the git shell.

I don't think there will be direct Docker support for Windows (erm... hrm)

http://coreos.com/blog/coreos-vagrant-images/

Re:Docker can now run within Docker by yebyen on Thursday September 05, 2013 @03:19PM (#6336273)
Actually I do remember hearing that docker/lxc was only the beginning, can you be more specific? What virtualization tech in Windows do you want to see Docker containers running in?

There's no reason you can't run CoreOS in qemu or CoreOS in VirtualBox, but all of those things are still coming back to Linux Containers. Did you have an idea of another way?

Re:Docker can now run within Docker by gcr on Thursday September 05, 2013 @10:00PM (#6338277)
Would each container run on something like coLinux?

(coLinux is a port of the Linux kernel to run as an ordinary Windows program, so you can run the Linux kernel as a Windows userland program by double-clicking on "linux.exe"; then you can SSH in and mess around, etc)

Re:Docker can now run within Docker by csears on Thursday September 05, 2013 @05:48PM (#6337319)
I wouldn't expect Windows support anytime soon, especially Windows containers running in a Linux host using LXC as the "hypervisor".

Windows containers running in a Windows host is much more likely. Commercial solutions like Virtuozzo Containers offer Windows on Windows support today [1]. Someone could implement a Virtuozzo-for-Windows provider for Docker, but that seems like a long shot.

[1]: http://www.parallels.com/products/pvc/what-s-new-for-windows...

Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @03:17PM (#6336256)
Are you looking forward to run the Docker CLI in Windows (i.e., being able to use Docker commands from a Windows machine, while the containers run on a remote box), or run the containers themselves on a Windows box?
Re:Docker can now run within Docker by likeclockwork on Thursday September 05, 2013 @07:43PM (#6337883)
When will Docker support distros other than Ubuntu?
Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @08:30PM (#6338058)
There is already some support for Gentoo and Archlinux, and if you are willing to use a "foreign" kernel, Red Hat / Fedora / CentOS work as well.

There is some significant work in progress to add compatibility for non-AUFS systems. I don't have an accurate timeline at this point, but expect something (or at least an announcement) at the end of the month!

Re:Docker can now run within Docker by gcr on Thursday September 05, 2013 @09:56PM (#6338268)
Last I checked, using Docker on Arch required a custom kernel with the AUFS patch. Is that still true?

Edit: yes, docker on arch still requires a custom kernel. See http://docs.docker.io/en/latest/installation/archlinux/

Re:Docker can now run within Docker by jpetazzo on Friday September 06, 2013 @02:28AM (#6338996)
Yeah, still true, but we are actively working on an alternate implementation to be compatible with anything post 3.2 and RHEL 6.4 as well.
Re:Docker can now run within Docker by shykes on Friday September 06, 2013 @03:14AM (#6339112)
Just to confirm that we're planning to remove the dependency on aufs for the 0.7 release (late September). As a result docker will run on vanilla linux kernels.

aufs will probably come back as a plugin in a future version.

aufs is great and I wish we could keep it as the default. But the kernel politics are what they are.

Re:Docker can now run within Docker by gcr on Sunday September 08, 2013 @01:59AM (#6347975)
Oh interesting. What are you moving to? Are you hooking into 'libc' to be able to intercept file accesse for layers or something?
Re:Docker can now run within Docker by shykes on Monday September 09, 2013 @07:12PM (#6356923)
We're moving to device-mapper, which is the underlying block-level facility used by LVM.
Re:Docker can now run within Docker by willvarfar on Friday September 06, 2013 @04:55AM (#6339369)
post 6.4 means > or >=? Will it run on my ec2 rhel 6.4 out-of-the-box?
Re:Docker can now run within Docker by jlgreco on Thursday September 05, 2013 @08:45PM (#6338104)
Good to hear. I've played around with Docker a bit but I don't have a compelling enough use for it yet to keep on building AUFS kernels.
Re:Docker can now run within Docker by likeclockwork on Friday September 06, 2013 @03:09AM (#6339096)
Thanks for the information!
Re:Docker can now run within Docker by bachback on Friday September 06, 2013 @07:36AM (#6339838)
Amazing. What do the docker guys think of coreOS?
Re:Docker can now run within Docker by arnley on Thursday September 05, 2013 @02:29PM (#6335920)
so meta
Re:Docker can now run within Docker by nnnnni on Thursday September 05, 2013 @04:07PM (#6336593)
Also "yo dawg...".

Now that the obligatory comments have been covered, we can move on. Yay!

Re:Docker can now run within Docker by jpetazzo on Thursday September 05, 2013 @05:38PM (#6337242)
Yeah... Note for future self: make all the mandatory lame jokes in the blog post itself, so people don't feel obligated to do them on HN instead. ;-)
Re:Docker can now run within Docker by reginaldjcooper on Friday September 06, 2013 @02:30AM (#6339003)
Please no :) just rely on us to downvote these people on HN, then you can spare at least some of the readers the pain.

I don't even understand, it's not like it's conversation or even funny, but X in X immediately results in someone announcing their awareness of canonical jokes. "yo dawg i heard you like plays so I put a play in your play to inception the king."

Re:Docker can now run within Docker by mrmondo on Thursday September 05, 2013 @05:58PM (#6337381)
I take it you break out of docker-docker when you here the theme from inception starting to play.