Difference between Docker and AMI

Schleir picture Schleir · Jan 17, 2017 · Viewed 15.5k times · Source

In the context of AWS:

AMI is used to package software and can be deployed on EC2. Docker can also be used to package software and can also be deployed to EC2.

What's the difference between both and how do I choose between them?

Answer

Jerry Vines picture Jerry Vines · Jan 17, 2017

An AMI is an image. This is a whole machine that you can start new instances from. A docker container is more lightweight and portable. A docker container should be transportable between providers while an AMI is not (easily).

AMI's are VM images basically. Docker containers are packaged mini-images that run on some VM in an isolated environment.