Containers are about Software!
Here's what it looks like to run software with containers:
Find the software, on Docker Hub.
Download the software with docker pull, comes down as an image which is much like a zip file or msi installer. An image is an application packaging format.
Instead of installing the software, we create a container. So, a container--a stopped container--is like installed software. Docker unpacks the image onto the computer, creating a container. Note: if you just want to create a container, you can use docker create.
Then we run the container which is exactly like running an exe. It's the same thing under the covers!!!
We often use docker run to orchestrate all of these steps with one command, how convenient!
docker exec can be thought of as running another copy of our installed software, like when we launch an executable twice. For example, two copies of Microsoft Word. Or with MongoDB, we might run two mongo clients. After a container is created and running, we can use docker exec to run multiple applications, or multiple copies of the same app, inside the container.
Key differences between docker and traditional software
|Traditional Software||Docker equivalent||docker command|
|Download software i.e a zip fileor a MSI
||Pull an image
a container from the image
||stop the container||docker stop
all this with