- We build hundreds if not thousands of docker images a day after each CI commit. Thats not viable with virtual machines or AMIs.
- Docker has the union file system, so pushes and pulls of Docker images after each CI build are tiny;
- Docker is more platform independent whereas AMIs are very EC2 specific. No other cloud provider have anything as sophisiticated as AMI;
- Rollbacks are instant with Docker;
Docker can also be used in conjunction with autoscaling and resilience. We have 10+ containers on a box, but still replicate this 5 or 6 times and will possibly add EC2 AutoScaling in future. Cloud and Docker are complementary not an alternative in my opinion.
Big fan of packer.io + AMI / Virtualbox / GCE for this.
See generally: http://www.infoq.com/articles/virtual-panel-immutable-infras...
Honestly, I would prefer to run as many small/medium instances rather than a powerful instance but to host many dockers inside it, because if you put all the eggs in one basket and when then host machine is down, you are having a bigger problem; if you host a single docker on an ec2 instance, and as I said before, you can already solve this via AMI without the overheads/abstraction.
Of course, it is still very useful to run docker on a physical machine when you don't want to setup KVM or mess up with OpenStack.