News for hackers. Stuff that matters.
Re:Gocker: Docker implemented in 1.3k lines of Go by miked85 on Wednesday June 17, 2020 @10:20PM (#23559145)
Isn’t Docker implemented in Go already?
Re:Gocker: Docker implemented in 1.3k lines of Go by donio on Wednesday June 17, 2020 @10:47PM (#23559299)
...and it was probably around 1.5K lines early in its life.

But that misses the point. This is very helpful for understanding how a Docker-like system works since it's a small and mostly self-contained implementation. You can read through the entire thing and fully understand it.

It only cheats in the container registry handling where it pulls in github.com/google/go-containerregistry and for the network setup where it uses github.com/vishvananda/netlink. The rest is done in terms of Go stdlib and syscalls.

Early Docker used external utilities (lxc, iptables) and had the client/server stuff already so it's not as straightforward.

Re:Gocker: Docker implemented in 1.3k lines of Go by shuss on Wednesday June 17, 2020 @11:27PM (#23559524)
Yep. Docker is famously written Go. The only reason I wrote this is as an educational tool to discuss how containers under Linux really work. It’s self-contained (pun unintended) except for the usage of the go-containerregistry package, which anyway does stuff unrelated to how containers are managed on Linux.
Re:Gocker: Docker implemented in 1.3k lines of Go by birdyrooster on Wednesday June 17, 2020 @10:32PM (#23559221)
Doesn't matter, rewrite it and make the name a gortmanteau.
Re:Gocker: Docker implemented in 1.3k lines of Go by dvtrn on Wednesday June 17, 2020 @10:43PM (#23559287)
gortmanteau

Sir we need you to come with us.

Re:Gocker: Docker implemented in 1.3k lines of Go by rantwasp on Wednesday June 17, 2020 @10:56PM (#23559351)
take your upvote and get out :))
Re:Gocker: Docker implemented in 1.3k lines of Go by stock_toaster on Wednesday June 17, 2020 @11:44PM (#23559608)
I think you mean, take your upvote and go. ;)
Re:Gocker: Docker implemented in 1.3k lines of Go by rantwasp on Thursday June 18, 2020 @10:10AM (#23563263)
take your upvote, check err and go.
Re:Gocker: Docker implemented in 1.3k lines of Go by thephyber on Wednesday June 17, 2020 @10:22PM (#23559157)
Yes. TIL.

> What Programming Language Does Docker Use? Docker is written in the Google Go (golang) programming language. To learn why Go was used, we’ll refer you directly to Google.[1]

[1] https://blog.stoneriverelearning.com/docker-101-what-is-dock...

Re:Gocker: Docker implemented in 1.3k lines of Go by IceWreck on Thursday June 18, 2020 @05:37AM (#23561429)
Yeah both Docker and Podman are written in Go