I started reading about Docker last October and introduced it to our local Ruby meetup a month later. I’ve put it aside and picked it up again after the release candidate was announced.
One of the things I’ve struggled with learning this tool is not having a good mental model of the terms used in the documentation.
An image is your application code, including anything that it needs in order to run. This serves as a template for containers.
A container is an instance of an image. You can start, stop, and inspect a container.
To check which containers are running in your docker machine, run this command:
docker psIn order to run a container, you will need an image. The Docker Index hosts these commonly used images (e.g. ubuntu):
docker pull ubuntuAn image consists of a series of changes made to a filesystem, called layers. Docker downloads these layers if they are not already present in your docker machine.