Live data from Hacker News

Gocker: Docker implemented in 1.3k lines of Go

unixism.net

61–70 of 89 posts

Re: Gocker: Docker implemented in 1.3k lines of Go

#61

Earlier quoted context omitted.

> the tech itself is sound and does guarantee reproducibility Does the tech guarantee reproducibility if you can use it to create un-reproducible artifacts? I don't think Docker claims anywhere to guarantee reproducible builds...

It does an implicit guarantee though. You can match the image digests and it does verify that the image is exactly the same as you intended it to be. Docker also has trust signing now to make additional guarantees. Are you trying to claim that it's possible to have same image digests but the content of images is different?

The problem is the implicit guarantee:

- Step 3: pip update && install X

- Step 4: run step-tool

- Step 5: pip update && install Y

To be clear, I'm sure all these things can be solved by a complex enough stream of shell commands, but I'm also forced to shove in updates at every step of my build, which is an artifact of the build-system

Re: Gocker: Docker implemented in 1.3k lines of Go

#63
post #32
post #25

Can someone explain the value/purpose of docker to someone who (easily) deploys regular apps to a Digital Ocean droplet?

Easily. * A Docker image normally contains all the dependencies of a program, or a set of programs. You can run libraries and other software of whatever versions, not necessarily available on your host system; they are already baked into the image. Usually a Docker image only needs a compatible kernel (this is a very lax restriction). It is a damn easy way to distribute software, especially such software which is not…

The biggest advantages though is having to explicitly define al the edges:

- You need persistent storage? You better define it or you'll lose it one the next (re)deploy. - You need to expose network services? Tell me which-ones or it won't work.

If we're talking on small scale single server deploys, it makes backup, upgrade/rollback and migration of applications a LOT easier.

As long as you're not talking about a k8s cluster - which you should avoid with application architectures that aren't "cloud native", I assume you'll have a local docker-compose file which you just start/stop to bring the entire application stack you need (database/app/proxy server/monitoring/...) with one command, which means all external service dependencies are also contained in one 'stack'.

What I also use it for on small-scale apps is having a test environment of the same software running on the same droplet. I just put a Traefik reverse proxy in front of it that autodetects the docker containers, handles HTTPS/ACME certificates and routes the test-url to the test-containers, the real URL to the "production" containers, and they're all isolated.

Re: Gocker: Docker implemented in 1.3k lines of Go

#67
Pretty cool, and very educational for people not familiar with how these things work

That said (and I've said this before), this is not really Docker. It's running containers, not the same thing. If you want to compare it to anything, it's runc, but that's not a good headline :)

Not that the docker architecture is that clean, but it is the combination of ideas it brought to the table what made docker docker:

- have APIs to do everything, from launching workloads to building images. - combining layered filesystems with os-level namespaces - package format for "images" coupled with a distribution system

If it was just starting containers, that was already possible for a good while (and many shared hosting providers already did this).

I think many people underestimate the importance of the first point, having an API to do all this. It's having this combination of ideas that democratised cloud computing, it is what makes the bigger picture possible. While the Docker API is currently not very important anymore, it showed the possibilities, and made the limitations it had also very apparent, and at the beginning, nobody had solutions for this. It took things like Mesos and kubernetes to take it to the next level, with the latter having become the de-facto standard container API.

Re: Gocker: Docker implemented in 1.3k lines of Go

#68
post #34

Very nice! I love projects like this that return to first principles, and rebuild the core without the cruft. It is refreshing. The dependency on netlink adds a little to the code weight. Some of this also feels like it could just be a shell script (sh, unlike Go, ships with built in Linux support for netlink, and sticks with dotted-quad-string types for IP addresses instead of mixing with int32!) I did not realize c…

TBH, all network utilities I ever saw accept the int32 form of IP addresses. E.g. ping 127.0.0.1 can also be written as ping 0x7f000001 Try it; it works.

URLs too, though Chrome makes them canonical:

http://0xacd91124/ -- Google

I did a quick search for whether "fun" Hex strings are reachable, but didn't find any (e.g. the canonical http://0xcafebabe). Random combination of hex-words are login pages to web cameras or cable modems. I didn't try to e.g. replace "e" with "3", e.g. http://0xcaf3babe/

Re: Gocker: Docker implemented in 1.3k lines of Go

#69
post #66
post #55

Earlier quoted context omitted.

https://youtu.be/bXNwzKo5Yps

The video doesn't seem to be available - perhaps it is marked as private?

Must be country block due to copyright cause it works for me, it's a scene from Meet the Parents - Milking Cats.

Re: Gocker: Docker implemented in 1.3k lines of Go

#70
post #66

Earlier quoted context omitted.

The video doesn't seem to be available - perhaps it is marked as private?

Must be country block due to copyright cause it works for me, it's a scene from Meet the Parents - Milking Cats.

And the portmanteau of Fortran/Docker is the same as the surname of the character in the film
Post reply on HN