Live data from Hacker News

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

github.com

101–110 of 122 posts

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

#101
post #52

Earlier quoted context omitted.

Right, because there could be a security vulnerability in any one of those 100 lines of the Bash script. ;)

People here usually flip out about security when there is a 1 line bash install script. The world is a scary place when you don’t trust anyone

The world is an even scarier place when you trust the wrong person

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

#102

My team is being hit with really extreme pricing changes for Docker Desktop. I have never been clear on why we even wanted DD (I guess right now it’s the easiest path to getting x86 containers running on M1 Macs?). Alternatives like Podman or even a more extreme solution like this one are becoming more and more attractive.

I actually replaced Docker Desktop on my M1 Mac, because even after quitting the app (properly), the qemu VM kept runing, and running my battery. I like that I have more control over the processes with podman. `podman machine stop` and the vm is gone.

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

#104

Earlier quoted context omitted.

People here usually flip out about security when there is a 1 line bash install script. The world is a scary place when you don’t trust anyone

The world is an even scarier place when you trust the wrong person

Every piece of software relies to some degree on other software. Similarly, every person relies to some degree on other people. As long as you don't find yourselves in a race to the bottom of the barrel, things should be okay.

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

#105
post #71

Earlier quoted context omitted.

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.

How are the first two essential? If they’re useful anyone could improve on them

Dockerfile format is essential because it allows for a single code to build container. This code could be used by docker build, docker buildkit, podman, kaniko and other tools. It's not ideal but it's good enough.

Container image format is essential because it allows for a shared ecosystem of containers. There are plenty of container registries and you can just pull any image, build your image using those other images, etc.

Basically docker introduced some standards and everyone accepted those standards. And that's a good thing. They're far from ideal, but they're kind of shared among implementations and good enough I guess.

Now with those standards you can innovate on implementations. Some people replaced docker with podman, having access to the same vast repository of containers. Some people replaced docker build with kaniko, which allows to build containers in a different way using the same source Dockerfile.

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

#106
post #71

Earlier quoted context omitted.

How are the first two essential? If they’re useful anyone could improve on them

Dockerfile format is essential because it allows for a single code to build container. This code could be used by docker build, docker buildkit, podman, kaniko and other tools. It's not ideal but it's good enough. Container image format is essential because it allows for a shared ecosystem of containers. There are plenty of container registries and you can just pull any image, build your image using those other image…

This a bazillion times. It’s not great but it’s good enough, next problem. If only JavaScript devs could take a lesson from this and

stop making new frameworks

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

#107

Earlier quoted context omitted.

> You shouldn't replace Docker with a shell script True. You should replace it with podman!

I see such suggestions here and there, but after quick redditing I've got impression podman brings more chores being rootless and daemonless. I couldn't justify usage of it for myself.

Answering for myself:

Had short discussion with couple of friends more familiar with podman vs docker, they highlighted the case when you need to give access to docker socket (say for building images) or for other needs to someone who is not in infrastructure admins (devops) team. As we know, having access to docker effectively meant root access on host, so such untrusted parties access implies severe risk of your host belongs to someone else now.

For such cases, when you cannot guarantee the one who operates docker is the root on host anyways, podman starts to make sense.

Quick demo and intro: https://m.youtube.com/watch?v=OVkj_W6Bynk

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

#108
post #45
post #4

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

It's a short bash script calling out to things like btrfs, cgcreate, cgexec, nsenter, etc. All of which get updates regularly.

Very true, but I still think it's worth pointing out that this emulates Docker from 2015, while Docker today probably doesn't look the same anymore.

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

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

Should probably run it in a VM just to be safe

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

#110

Earlier quoted context omitted.

Dockerfile format is essential because it allows for a single code to build container. This code could be used by docker build, docker buildkit, podman, kaniko and other tools. It's not ideal but it's good enough. Container image format is essential because it allows for a shared ecosystem of containers. There are plenty of container registries and you can just pull any image, build your image using those other image…

This a bazillion times. It’s not great but it’s good enough, next problem. If only JavaScript devs could take a lesson from this and stop making new frameworks

Here's my reply to someone else saying this listing the relatively few frameworks over the decades: https://news.ycombinator.com/item?id=32995128
Post reply on HN