Live data from Hacker News

Bocker: Docker implemented in around 100 lines of Bash (2015)

github.com

31–40 of 122 posts

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#31
post #25

Earlier quoted context omitted.

Why do people care about github stars?

The same reason why people care about likes on Facebook or karma on HN. Internet points mean very little, until you get enough that you start floating to the top of popularity rankings, at which point they suddenly become indirectly monetizable.

Stars have some value in they at least let you see that (the potential for funny business aside) many people have looked at the repo and upvoted it for whatever reason. I'm sure there are buggy or otherwise sketchy repos with many stars, and various gems with few stars (I have some :p ), though overall it's a signal

Incidentally karma on HN is similar to the extent that it lets you how active a participant someone is, and that they're not a troll or throwaway. Again, it can certainly be gamed, and throwaway accounts often add valuable comments, but its still a signal

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#32

Just because you can doesn't mean you should.

You shouldn't replace Docker with a shell script but you should understand (at some level) how Docker works. Unfortunately this code is pretty dense so it would probably take a while to untangle it.

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#33
post #3

It looks like it relies on BtrFS? Can anyone add support for OverlayFS 2? :) which I think is more deployed these days due to Docker itself I’d be curious to see how it looks

I, too, wanted something like that and wrote it, in bash. :) Can confirm it's just as easy to do as you'd expect, and works quite well.

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#34
post #14
post #3

It looks like it relies on BtrFS? Can anyone add support for OverlayFS 2? :) which I think is more deployed these days due to Docker itself I’d be curious to see how it looks

With overlays, you'd need some kind of registry of all the images in the underlying filesystem. Btrfs subvolumes give that to you for free, essentially. No need for deciding where to put them, just give them a name.

Or you could treat the final image for the container as the read only base for the overlay. That's what I do. I "flatten" the image from buildkit, and untar it to a directory. Then make an overlay mount for the container and chroot inside. :)

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#35
post #9
post #7

Woah! Don't know if it can be used as a proper Docker replacement (probably not), but I sure do appreciate the project as an example of how to use all the tools to implement an isolated environment. And the fact that it actually works with Docker containers (well, why wouldn' it, but still) is just a cheery on top!

> Don't know if it can be used as a proper Docker replacement The readme says "I can make no guarantees that it won't trash your system", so yeah clearly not intended for real use.

that's why smart people always check this stuff out on spare machines and VMs.

Right?

... right?

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#36
post #27
post #4

Just a note that this repo's latest update was in 2015

You're telling me it's so stable and mature that it hasn't needed an update in 7 years? Incredible.

It can mean that but the world is a wicked place and that means no security updates either. Maybe none are needed.

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#37
post #34
post #14

Earlier quoted context omitted.

With overlays, you'd need some kind of registry of all the images in the underlying filesystem. Btrfs subvolumes give that to you for free, essentially. No need for deciding where to put them, just give them a name.

Or you could treat the final image for the container as the read only base for the overlay. That's what I do. I "flatten" the image from buildkit, and untar it to a directory. Then make an overlay mount for the container and chroot inside. :)

Right, but the point is a btrfs snapshot does that for you. No need for a "flattening" step, just make a copy-on-write snapshot of your layer at whatever state it exists in and go. Delete the original later, etc... Doesn't matter.

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#38

Earlier quoted context omitted.

That emoji exists because of the blood type. 🅰🅱🆎🅾 There was a meme a while back where people would use 🅱 all over the place. Not sure why it was funny but it was.

If you have to explain it, it's not funny. Particularly when the knowyourmeme page seems to indicate it's most prominently used by racists.

I see no mention of the word racist on that page. Can you point it out?

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#39
post #16

Earlier quoted context omitted.

Why do you need an emoji for the letter ‘B’?

That emoji exists because of the blood type. 🅰🅱🆎🅾 There was a meme a while back where people would use 🅱 all over the place. Not sure why it was funny but it was.

I think it was popular because of 🅱reaking 🅱ad

Re: Bocker: Docker implemented in around 100 lines of Bash (2015)

#40

With all those prerequisites it's definitely possible. I can implement Docker witt one prereq in one line of Bash: docker "$@" You're welcome, internet.

Except, docker has the same prerequisites. That's kind of the point of this excercise, to show that docker is primarily glue between existing tools, not necessarily new technology.
Post reply on HN