Loading Depth Study
Preparing your workspace
An image is an immutable application template, while a container is a running or stopped instance created from an image.
A Docker image contains the filesystem, application files, dependencies, and metadata needed to create a container. A container is created from that image and receives its own runtime state. Multiple containers can be created from the same image. Containers can be started, stopped, inspected, and removed independently from the image they came from.
One Node.js image can be used to create separate development, test, or application containers when the environment and configuration are appropriate.
docker pull nginx docker run -d --name web nginx docker ps docker stop web docker rm web
The nginx image is downloaded, a container starts in the background, and the container can then be stopped and removed.