3 ms·
Back in 2016 during the original discussion of this article, amount said it very well in [0]: "If you hit this many problems with any given tech, I would sugge
by theamk 5y ago
Back in 2016 during the original discussion of this article, amount said it very well in [0]:
"If you hit this many problems with any given tech, I would suggest you should be looking for outside help from someone that has experience in the area."
- Yes, "clean old images" was not implemented back then. His hack is not that bad, and one can filter out in-use images if they want to pretty easily. Anyway, docker does have "docker image prune" now.
- Storage driver history discussion is entirely incorrect. No, docker did not invent overlayfs nor overlayfs2. There was a whole big drama of aufs not mainlining, but it was mostly in context of live cd's, not docker.
But the big missing thing is: you should not store important data in docker images, Docker is designed to work with transient container. If you have a database, or a high-performance data store, you use volumes, and those _bypass_ docker storage drivers completely.
- The database story is completely crazy... judging by their comments, they decided to store the database data in the docker container for some reason and got all the expected problems (unable to recover, hard to migrate, etc....). It is not clear why they didn't put database data on the volume, there is a 2016 StackOverflow question discussing it [0].
Also, "Docker is locking away [...] files through its abstraction [...] It prevents from doing any sort of recovery if something goes wrong." Really? I did recovery with docker, the files are under /var/lib/docker in the directory named with guid, a simple "find" command can locate them.
- By default, Docker uses Linux networking and yes, the configuration is complex so it adds overhead. That's why there is --net=host option (which was there for a long time) which just bypasses that all.
[0] https://news.ycombinator.com/item?id=12872636 https://news.ycombinator.com/item?id=12872636
[1] https://stackoverflow.com/questions/40167245/how-to-persist-data-using-postgres-docker-image https://stackoverflow.com/questions/40167245/how-to-persist-...