4 ms·
slightly related: docker clone in 120 lines of bash - https://github.com/p8952/bocker/blob/master/bocker https://github.com/p8952/bocker/blob/master/bocker
by black3r 5y ago
slightly related: docker clone in 120 lines of bash - https://github.com/p8952/bocker/blob/master/bocker https://github.com/p8952/bocker/blob/master/bocker
- tenuousemphasis 5y agoThis is so clever. I love the use of comments and parsing the source file for those comments as a way of displaying help.
- pmarreck 5y agois Docker married to btrfs?
- tyingq 5y agoDocker defaults to overlay2, but supports btrfs and others: https://docs.docker.com/storage/storagedriver/select-storage-driver/ https://docs.docker.com/storage/storagedriver/select-storage... "Bocker" uses btrfs only.
- pmarreck 5y agoI wish Docker had been kept as simple as possible. A Bocker that uses overlay2 could potentially be a Docker-like MVP.
- LanternLight83 5y agoI 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'.
- cle 5y agoIt'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.
- sillysaurusx 5y agoMy dreams of one day reading a full clone of docker in 120 lines or less are shattered. Maybe next time.