Live data from Hacker News

Show HN: Bocker – Docker implemented in 100 lines of bash

github.com

11–20 of 89 posts

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#11

Using btrfs subvolumes as the image format, that's a nice touch. On the same road as the hypothetical systemd packaging system (not that I'm very enthusiastic about that). The network, PID and mount namespaces are the ones unshared, plus a private /proc. I like tools like this because they're reality checks on how the basics of Linux containers are just a few essential system calls, and particularly that they're limi…

Thank you.

One of the things I found really interesting here is how much could be done with just basic userland tools, and how old some of those tools are.

Docker was released in 2013, but support for kernel namespacing has been around since ~2007. That's quite a long time for such a great feature to go mainstream.

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#12

Here's a proof-of-concept implementation of "docker pull" in bash (YMMV, I think it has broken since I wrote it): https://gist.github.com/tlrobinson/c85dca269f4405ad4201

Looks good!

I'd marked 'docker pull' as out of scope because I thought it would be fairly hard to interface with their API from bash, looks like I was wrong.

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#13
post #11

Using btrfs subvolumes as the image format, that's a nice touch. On the same road as the hypothetical systemd packaging system (not that I'm very enthusiastic about that). The network, PID and mount namespaces are the ones unshared, plus a private /proc. I like tools like this because they're reality checks on how the basics of Linux containers are just a few essential system calls, and particularly that they're limi…

Thank you. One of the things I found really interesting here is how much could be done with just basic userland tools, and how old some of those tools are. Docker was released in 2013, but support for kernel namespacing has been around since ~2007. That's quite a long time for such a great feature to go mainstream.

Yes. The basic technology has been there for a while. And the Docker source code has some eyebrow-raising parts to it.

However, I've stated this in other threads: Docker isn't about containment. It's really about the packaging system. I don't think this technology demo gets that.

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#14
post #13
post #11

Earlier quoted context omitted.

Thank you. One of the things I found really interesting here is how much could be done with just basic userland tools, and how old some of those tools are. Docker was released in 2013, but support for kernel namespacing has been around since ~2007. That's quite a long time for such a great feature to go mainstream.

Yes. The basic technology has been there for a while. And the Docker source code has some eyebrow-raising parts to it. However, I've stated this in other threads: Docker isn't about containment. It's really about the packaging system. I don't think this technology demo gets that.

I agree 100%. While the tech in Docker is great, it alone can't be easily monetized.

The real value comes from things like DockerHub, and getting people to buy into the whole ecosystem.

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#15
post #7

not sure if you ever saw this - https://www.phoronix.com/scan.php?page=news_item&px=CoreOS-B... it might be interesting to see a version of your script using overlayfs

Interesting, it was my understanding that Docker was going in the other direction. Moving off AuFS towards Btrfs due to issues getting AuFS patches into the mainline kernel. I'll have to look info CoreOS's reasons for going with Ext4.

Docker 1.6+ works with overlayfs on my debian box (in production). I thought AUFS was already deprecated

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#16
post #14
post #13

Earlier quoted context omitted.

Yes. The basic technology has been there for a while. And the Docker source code has some eyebrow-raising parts to it. However, I've stated this in other threads: Docker isn't about containment. It's really about the packaging system. I don't think this technology demo gets that.

I agree 100%. While the tech in Docker is great, it alone can't be easily monetized. The real value comes from things like DockerHub, and getting people to buy into the whole ecosystem.

Which is probably why people were concerned about Docker's expansion into the clustering and orchestration markets, even if from a business perspective those are their only real holdouts to avoid commodification. The base Docker is easy to replace if the project goes out of hand, the services around it are trickier.

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#18
Holy crap! I've been keeping up with the hype, yet having never used Docker and never needed it yet I can't help but become more skeptical now that I know that it's features aren't more complex than a little bit of bash.

People give bash a hard time, but things like this really give me that warm, fuzzy feeling.

esac4lyfe

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#19
Just playing with this in a VM with an attached btrfs volume, a complete revelation. 96 lines! And it's actually pretty functional. This takes keeping it simple to a whole new level.

The Wheezy image I use with LXC worked well enough, the minimal alpine image not so well, apk complaining about its database.

User name spaces support would be nice, then we can play with unprivileged containers.

And Overlayfs would be a nifty alternative to btrfs, it's in kernel 3.18, and 4.04 adds support for multiple lower layers. But this btrfs implementation is cool too. Cgroups support will be somewhere on that list too.

Cgroups and namespaces is in the kernel. General Linux ecosystem for networking, storage and distributed systems is already extensive. The possibilities are endless.

So now LXC, Docker, Rkt and Nspawn have Bocker for company.

Re: Show HN: Bocker – Docker implemented in 100 lines of bash

#20

Holy crap! I've been keeping up with the hype, yet having never used Docker and never needed it yet I can't help but become more skeptical now that I know that it's features aren't more complex than a little bit of bash. People give bash a hard time, but things like this really give me that warm, fuzzy feeling. esac4lyfe

Why would it need to be more complex than "a little bit of bash" if it fulfils the task intended?

Surely that is better than a convoluted, 1,000,000,000 LoC application that no one outside a handful of core developers understands? Right?

Post reply on HN