4 ms·
There are two pain points which I have experienced while using Docker. Cons: 1. Disk usage 2. Permissions issues from volume mounts Docker is really
by gravypod 9y ago
There are two pain points which I have experienced while using Docker.
Cons:
1. Disk usage
2. Permissions issues from volume mounts
Docker is really bad at garbage collection and it's not uncommon to have docker use more than 40GB of disk on my machine at any given time.
In development it's sometimes handy to have volume mounts for often changing files. This causes a lot of permissions issues with the containers. There's some support in native docker to handle this (--user) but this support isn't handled well by things like Docker Compose.
Pros:
1. Easy to develop with
2. Easy to version
3. Easy to deploy
4. Easy to migrate to another server
Gone are the days when you have to copy and paste the manual "apt-get install....." from readmes. Just install Docker, clone the monorepo, run "docker-compose up -d", and the entire development environment is now up and running. You can rollback your entire system to any point in time, build everything, and push it into production with amazing tooling around everything.
You also never have to worry about developing two services that are both networked that both want to use the same port. If I have Web Server A and Web Server B I can run them with all production-similar configs (80/443) in development all on my laptop.
- imauld 9y agoI feel your pain on the disk usage, especially when rapidly making changes and building with `docker-compose up --build`. However `docker system prune` is your friend here. It would be great if it were automated and a little smarter, it basically leaves no survivors, but for all the advantages of Docker this isn't so bad.
- gravypod 9y agoThere are some community written garbage collectors out there that are good but none mainlined yet. I do agree that docker's pros are worth the cons. Anyone who has every migrated a large application that they didn't have good documentation on the installation or configuration process (especially ones which you have written and forgot about) knows how valuable good, self-contained, packaging is.
- imauld 9y agoI've used docker-gc by Spotify for production nodes that needed cleaning up and it's worked pretty well.