News for hackers. Stuff that matters.
Re:Linux containers in 500 lines of code (2016) by black3r on Thursday March 10, 2022 @05:12AM (#30625219)
slightly related: docker clone in 120 lines of bash - https://github.com/p8952/bocker/blob/master/bocker
Re:Linux containers in 500 lines of code (2016) by tenuousemphasis on Thursday March 10, 2022 @08:27AM (#30626629)
This is so clever. I love the use of comments and parsing the source file for those comments as a way of displaying help.
Re:Linux containers in 500 lines of code (2016) by LanternLight83 on Thursday March 10, 2022 @11:03AM (#30628424)
I think they're going for the minimal line count by in lining the docstrings. In some of my own scripts, I've lifted an idea that I saw in the wild where your Usage header and function docstrings are just prefixed with '#/', a more aesthetic and equally unlikely string (which also looks good in blocks, so it could even be restricted to newlines that just are comments, letting the line count breath a but and removing any worry of accidentally using that sequence in code). Our help function would then just 'grep w/e $BASH_SOURCE | cut w/e'.
Re:Linux containers in 500 lines of code (2016) by pmarreck on Thursday March 10, 2022 @10:18AM (#30627840)
is Docker married to btrfs?
Re:Linux containers in 500 lines of code (2016) by tyingq on Thursday March 10, 2022 @10:48AM (#30628210)
Docker defaults to overlay2, but supports btrfs and others: https://docs.docker.com/storage/storagedriver/select-storage...

"Bocker" uses btrfs only.

Re:Linux containers in 500 lines of code (2016) by pmarreck on Friday March 11, 2022 @01:25PM (#30643903)
I wish Docker had been kept as simple as possible. A Bocker that uses overlay2 could potentially be a Docker-like MVP.
Re:Linux containers in 500 lines of code (2016) by cle on Thursday March 10, 2022 @11:25AM (#30628703)
It's not really a clone, it's a tiny subset of Docker daemon functionality. It's missing huge things like building images from Dockerfiles, pushing to registries, networks, volumes, port forwarding, integration w/ containerd, health checking, event bus, and on and on.
Re:Linux containers in 500 lines of code (2016) by sillysaurusx on Thursday March 10, 2022 @11:33AM (#30628798)
My dreams of one day reading a full clone of docker in 120 lines or less are shattered. Maybe next time.
Re:Linux containers in 500 lines of code (2016) by petepete on Thursday March 10, 2022 @11:58AM (#30629192)
How does three lines of Perl sound?
Re:Linux containers in 500 lines of code (2016) by salawat on Thursday March 10, 2022 @04:18PM (#30632583)
Like a piano falling down the stairs.
Re:Linux containers in 500 lines of code (2016) by Anthony-G on Thursday March 10, 2022 @05:42AM (#30625411)
Previous discussion (Feb 2020): https://news.ycombinator.com/item?id=22232705
Re:Linux containers in 500 lines of code (2016) by benjaminwootton on Thursday March 10, 2022 @03:01AM (#30624368)
A good presentation along similar lines, incidentally by another Liz:

https://youtu.be/8fi7uSYlOdc

Re:Linux containers in 500 lines of code (2016) by est on Thursday March 10, 2022 @01:10AM (#30623702)
Cool, can we support Container Runtime Interface (CRI) with few more lines of code?
Re:Linux containers in 500 lines of code (2016) by pdpi on Thursday March 10, 2022 @03:58AM (#30624757)
This will be a fun read, thanks!

If you'd prefer to see the same ideas in video form, Liz Rice gave a pretty good prsentation on this same topic in 2018: https://www.youtube.com/watch?v=8fi7uSYlOdc

Re:Linux containers in 500 lines of code (2016) by jzer0cool on Thursday March 10, 2022 @01:52AM (#30623862)
I have to freshen up my C skills. I found this interesting to upvoting so I can pick your brain later :)
Re:Linux containers in 500 lines of code (2016) by danuker on Thursday March 10, 2022 @08:00AM (#30626411)
You can "favorite" posts also.
Re:Linux containers in 500 lines of code (2016) by tetris11 on Thursday March 10, 2022 @12:52AM (#30623631)
I love org mode documents as much as the next guy, but they really need better css for mobile on html export
Re:Linux containers in 500 lines of code (2016) by ricardobeat on Thursday March 10, 2022 @02:21AM (#30624034)
Would actually look better with no CSS at all
Re:Linux containers in 500 lines of code (2016) by sethgrisham on Thursday March 10, 2022 @01:42AM (#30623825)
Honestly thats something that I feel like is both lacking documentation and good, ready to use css templates. Had a bit of a pain a while ago making a stylesheet for my org exports
Re:Linux containers in 500 lines of code (2016) by cpach on Thursday March 10, 2022 @02:03AM (#30623918)
Have you tried water.css? It’s very nice https://watercss.kognise.dev/
Re:Linux containers in 500 lines of code (2016) by lelandfe on Thursday March 10, 2022 @07:35AM (#30626200)
Makes me feel like there’s a potential for a CSS Zen Garden spin off: a collection of small CSS files that make basic HTML look nice. No classes, just styling on raw elements.
Re:Linux containers in 500 lines of code (2016) by cpach on Thursday March 10, 2022 @07:44AM (#30626262)
Indeed. That would be really awesome.
Re:Linux containers in 500 lines of code (2016) by graderjs on Thursday March 10, 2022 @07:08PM (#30634399)
Oh, I discovered this too! I think it's called classless CSS and is actually a thing.

Here's a repo: https://github.com/dbohdan/classless-css

Re:Linux containers in 500 lines of code (2016) by gjvc on Thursday March 10, 2022 @07:16AM (#30626070)
I wish the web had more simple CSS like this.
Re:Linux containers in 500 lines of code (2016) by cpach on Thursday March 10, 2022 @07:45AM (#30626268)
I use it for some of my personal sites. Partly because I’m not incredibly good at typography/layout and partly to save time.
Re:Linux containers in 500 lines of code (2016) by matthberg on Thursday March 10, 2022 @01:24AM (#30623764)
Might benefit from a (2016) tag. Date gotten from the homepage: https://blog.lizzie.io/
Re:Linux containers in 500 lines of code (2016) by graderjs on Thursday March 10, 2022 @01:34AM (#30623794)
Oops, thought I'd added that. Thanks. Fixed.