# Docker Image vs Container ![rw-book-cover](https://a0.awsstatic.com/libra-css/images/site/fav/favicon.ico) ## Metadata - Author: [[aws.amazon.com]] - Full Title: Docker Image vs Container - Category: #articles - Summary: A Docker image is a reusable, read-only template built from a Dockerfile. A Docker container is a runnable instance made from an image with an extra writable layer. Images are immutable and stored for reuse; containers are mutable, isolated, and created or removed during an app's lifecycle. - URL: https://aws.amazon.com/compare/the-difference-between-docker-images-and-containers/ ## Highlights - A Docker container is a self-contained, runnable software application or service. On the other hand, a Docker image is the template loaded onto the container to run it, like a set of instructions. ([View Highlight](https://read.readwise.io/read/01k343q2x4a2grsr8vvjvhesj0)) - You store images for sharing and reuse, but you create and destroy containers over an application’s lifecycle ([View Highlight](https://read.readwise.io/read/01k343qa1cf2jhgxemeyj1dkcw)) - The Dockerfile contains all the instructions to build the image. You have to place the Dockerfile along with all associated libraries and dependencies in a folder to build the image. ([View Highlight](https://read.readwise.io/read/01k343qw4v71fvmtfrpdrqsv2c)) - The Docker image file is composed of image layers to keep the file size small.  Each layer represents a change made to the image ([View Highlight](https://read.readwise.io/read/01k343rete1dbyn98bbm9m4p5x)) - containers are mutable and allow modifications during runtime. Changes made within a container are isolated to that particular container and don’t affect its associated image. Some examples of changes are when you write new files, install software, or modify configurations. ([View Highlight](https://read.readwise.io/read/01k343t0rd4bmxap3htx56rvxx))