News for hackers. Stuff that matters.
Re:Ask HN: What are the disadvantages of Docker? by gravypod on Saturday April 21, 2018 @07:58PM (#16894035)
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.

Re:Ask HN: What are the disadvantages of Docker? by imauld on Saturday April 21, 2018 @08:14PM (#16894077)
I 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.

Re:Ask HN: What are the disadvantages of Docker? by gravypod on Saturday April 21, 2018 @09:32PM (#16894288)
There 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.

Re:Ask HN: What are the disadvantages of Docker? by imauld on Saturday April 21, 2018 @10:39PM (#16894441)
I've used docker-gc by Spotify for production nodes that needed cleaning up and it's worked pretty well.