Live data from Hacker News

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

github.com

41–50 of 122 posts

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

#41
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

It's like 100 lines of bash, I suggest just checking out the source code. Very easy to understand once you know the basics of containerization being basically just cgroups, namespaces, and filesystem level isolation. I link it to people who are trying to learn about what containerization actually does.

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

#42

follow up blogpost 'reimplementing 100 lines of bash in 1 million lines of go as resume building exercise'

Then a level 79 Unix beard reimplements it in 40 inscrutable lines of Perl in the shape of an ascii whale... But can't figure out how it works an hour later.

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

#43
post #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.

For me docker is three things:

1. Dockerfile concept.

2. Container image format (which is know known as OCI container).

3. Docker hub which is a repository of containers including high-quality ones.

Every thing is essential and bringed innovation.

Launching container is boring and not really interesting indeed.

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

#44
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.

I’ve been contacted more than once by recruiters who’ve been attracted by stars of my profile. It’s always a little challenging to explain to them that my profile is just my hobbies.

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

#46
post #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.

> You shouldn't replace Docker with a shell script

True. You should replace it with podman!

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

#47

follow up blogpost 'reimplementing 100 lines of bash in 1 million lines of go as resume building exercise'

Then a level 79 Unix beard reimplements it in 40 inscrutable lines of Perl in the shape of an ascii whale... But can't figure out how it works an hour later.

  =for comment
  keep the ascii whale swimming
  do not modify this code
  =cut

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

#48
post #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.

Link?
Post reply on HN