First, these terms mean the same in the docker world: Image, Docker Image, container image and OCI (Open Container Initiative) image.
Build time vs Run Time
- Images are a built time concept.
- These are the manifests used to deploy.
- Containers are a run time concept.
- These are the running instances of images.
- Containers are designed to run single applications or microservices.

In a typical production cloud deployment, your registry and machines sit in the cloud.
While DockerHub is the default registry, there are many options with cloud providers.
With the simple case of single container applications your machines run two commands:
- “docker pull” (downloading the image; make sure its the right version!)
- “docker run” (running the image as a container).



The full process is usually:
- Develop an application
- Create a Dockerfile (docker init)
- Build an image (docker build)
- Upload to a cloud registry (docker tag; docker push)
- On your machines, pull and run image as containers (docker pull, docker run)

Layers help us save time building, downloading, uploading
Layers are immutable and stack intelligently (hopefully) for great efficiency. Instead of repeatedly dealing with entire application + dependency code bases, this great innovation allows us to work on thin layers of the code.
If multiple images share the same base layer, say Alpine Linux, docker only needs to store one copy. Your application code can be a tiny download compared to downloading Linux for every container.

Containers are running images. Some docker commands:
- docker version
- docker run some-repo
- docker run –detach –name webserver -p 5005:8080 some-repo
- docker exec -it webserver sh
- docker stop webserver
- docker ps
- docker ps-a
- docker restart webserver
- docker rm webserver -f