Live data from Hacker News

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

github.com

91–100 of 118 posts

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

#91
post #74

I wonder why Bocker makes the frontpage so often. Is Docker still that controversial even in 2024? Why people don't recognize that it actually brought something useful (mainly, software distribution and easy of "run everywhere") to the table?

It's just a learning tool to see how docker works. Docker is just a combination of kernel tech that already exists. Namespaces, cgroups, and union file systems and probably few others.

Exactly. "Docker" is boring, everyone uses it, everyone knows it, no one really wants to rewrite it (on Linux) except for parochial infighting or religious license reasons.

But Linux containers[1] are actually fascinating stuff, really powerful, and (even for the Docker experts) poorly understood. The point of Bocker isn't "see how easy it is to rewrite Docker" it's "See how simple and powerful the container ecosystem is!".

[1] Also btrfs snapshots, which are used very cleverly in Bocker.

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

#92
post #56

I did something (slightly) similar via proot, called Bag [1], which I must have not described as a docker alternative: It has nothing to do with cgroups, and the cli deviates from that of docker's. The backstory: To bypass internet censorship and deep packet inspection, I had written a proxy chain solution masquerading itself as plain html traffic. I needed it constantly running everywhere I went, but I didn't want t…

Wow

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

#93

A brother from another mother: https://bastillebsd.org/ Bastille manages jails using shell with many of the same constructs you'd find in docker. I like it over other jail management software in BSD because it has so few dependencies.

Absolutely, it adds a lot of value for a shell script that is about 100 LoC.

By the way it took me a while to get why it was named Bastille. As La Bastille was a castle built to defend Paris from English attacks during the Hundred Years' War, and then turned into a prison.

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

#94
> Because most distributions do not ship a new enough version of util-linux you will probably need to grab the sources from here and compile it yourself.

Careful. The default installation prefix is /usr/bin, and the install will happily clobber your mount command with one that requires a library that doesn't exist. Then next time you boot, the kernel will mount the file system read-only.

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

#95

> Because most distributions do not ship a new enough version of util-linux you will probably need to grab the sources from here and compile it yourself. Careful. The default installation prefix is /usr/bin, and the install will happily clobber your mount command with one that requires a library that doesn't exist. Then next time you boot, the kernel will mount the file system read-only.

Should also be be /usr/local/bin.

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

#96

Earlier quoted context omitted.

What do you mean? It's been there for years: https://packages.debian.org/docker.io It’s an old version, and I think it isn’t supported by Docker Inc (for the reasons mentioned in the sibling comment), but it’s there.

Damn good to know! Have been gaslit by the ever-changing docker install instructions. Of course it would be a lagging version, but I think the docker feature-set has converged years ago, why would I care any more about the docker version than e.g. about the version of grep?

The buildx/build and docker-compose vs 'docker compose' are recent updates.

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

#97
post #46

I like when repos say "not implemented yet" or "to-do" or "working on" and the last commit was years ago. Makes me feel better about not going back to my to-dos I drop through my code. (Not meaning to throw shade on this author, just finding it comforting)

When you start a project it's worth spending some time thinking about "non-goals" i.e. features that come to mind but that you intentionally are not going to implement. It's absolultely fine and often very helpful to have clear scope boundaries so you don't end up chasing rabbits and having projects that never feel "finished."

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

#98
post #65
post #8

Earlier quoted context omitted.

My main dev machine is Linux so I use Rancher Desktop but I also have a MacBook Pro m1 machine. Orbstack is so much better than rancher and docker desktop. I know they are a small company but hell if their product isn’t significantly more efficient and better.

Podman-Desktop is also great b/c it now has gpu support on macOS (for the Linux container)

I could not get LocalStack to run on Podman (w/ Docker emulation), on Fedora, so had to go back to Docker.

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

#99
Two years ago I gave a presentation on how docker works under the hood. After trying to understand docker, moby and containerd and how they interact I was so happy to find Bocker. Pretty much show how it can be done while showing enough of the magic moves that docker itself is actually doing. Bocker is cups&balls with clear plastic cups by Penn and Teller for docker.

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

#100
post #28

Earlier quoted context omitted.

Nah, they should have prioritized building some sort of PaaS solution like CloudRun, Render or Fly so they can sell that to enterprises for $$$. Instead they did half-baked docker swarm which never really worked reliably and then lost ground to k8s rapidly

Didn’t they buy at least one of these? It was garbage, and no one cared.

dotCloud was actually what Docker came out of. No one cared because they didn’t prioritize it enough to make it good
Post reply on HN