Next terms used while woking with docker:
- image is "snapshot" of system that ready run application
- dockerfile is a file with instructions for building image
- container is a running image, you can consider it like virtual machine
- volume is a specially designed directory in the container
- docker-compose is a utility, that allow run/stop several containers
A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. It is like "snapshot" of system.
From public registry you can download images of different databases, java environment, nginx and etc. It is possible build new image based on others images.
You can consider container as lightweight virtual machine, but
- more agile than VM
- easy integrate with your existing IT processes like monitoring, backup and etc
- share common operating system and software libraries
When Docker runs a container, it runs an image inside it. This image is usually built by executing Docker instructions, which add "layers" on top of existing image or OS distribution. These instructions keep in dockerfile. By default it has name Dockerfile.
Volume is a specially designed directory in the container. It is initialized when the container is created. By default, not deleted when the container is stopped. It remains when there is no container referencing. It can be shared across containers.