It is kind of bonkers that we've gotten to a stage where more things know how to run a container than know how to run a statically linked binary.
It is kind of bonkers that we've gotten to a stage where more things know how to run a container than know how to run a statically linked binary.
Anything that "runs a binary somewhere" will essentially become docker given enough time. Docker is just "run this binary somewhere" everything above packaged into it.
Docker... doesn't do nearly any of those things?
1. binary + configs (PWD, files, ENV): baked into the image's Dockerfile
2. Secrets: passed in via env vars at runtime
3. Service discovery: docker-compose exposes container name as a hostname and provides a DNS record for this available in all netns that are connected to the same network.
4. data storage folders: Volumes https://docs.docker.com/storage/volumes/#share-data-among-ma...
5. Health checking: https://docs.docker.com/engine/reference/builder/#healthchec...
6. binary placement: https://www.docker.com/blog/multi-arch-build-and-images-the-...
7. networking configs: https://docs.docker.com/network/
8. log management: to file or to syslog over TCP (super easy to ship to ELK) https://docs.docker.com/config/containers/logging/configure/
9. fault-tolerant rollbacks: if you tag images correctly and you are upgrading from v1 -> v2 you can just replace the tag with :v1 to rollback to the correct version which will also be cached on the machine. If your registry is down you can still rollback.
10. Process isolation: this is exactly what docker is. Process isolation implemented in the kernel (sometimes).
Meanwhile: Docker can be pretty insane as a runtime (we don't use it for that!) but it's not an insane packaging format.