3 ms·
Ask HN: "Build your own Docker" tutorial – what to include?
I'm working on a tutorial to learn Docker internals.
The aim of the tutorial is to build a toy Docker clone that's capable of
pulling an image from docker.io and executing a command in it. It'll be
accompanied by an interactive challenge where you can code-along and
test your implementation.
Here's what I mean by an 'interactive code-along challenge': https://rohitpaulk.com/articles/redis-challenge
As with all tutorials of this kind, it's crucial to ignore the little
details and focus on the broad picture. Breadth over depth. The surface
area for Docker is so large that I'm having a hard time choosing what to
include and what to not.
Here are the rough areas I could identify:
- Process isolation
- [X] Filesystem isolation (`chroot~/~pivot_root' + mount namespace)
- [X] PID namespace
- [ ] UTS namespace (hostname + domain name)
- [ ] UID namespace
- [ ] Network namespace
- [ ] IPC namespace
- [ ] cgroups, resource limits
- Docker images
- [X] What format they're stored in
- [ ] Image layers
- Dockerfiles
- [X] How they're used to build images
- [ ] How caching works
- Docker Registry
- [X] How docker images are transferred over the network
- [ ] Caching mechanism
(the ticked ones are what I'm thinking of including in the tutorial)
If you were looking for a tutorial to learn Docker internals, what would
you want included? More importantly - what details would you not want
included?