Last Updated: March 1, 2017, 7:21 p.m.
Docker is an open source platform that provides a light weight virtual environment. By light weight environment, I mean, it is NOT a virtual environment like Oracle Virtual box or VMware player or VMware workstation but allows the application and its processes to run in a secluded environment without polluting user's environment with ease of portability.
Cgroups - Linux kernel feature that limits, accounts for, and isolates the resource usage of a collection of processes.
Container - A runtime instance of a docker image
Docker image - An ordered collection of root filesystem
Dockerfile - A text document that contains all the commands you would normally execute manually in order to build a Docker image.
Registry - A hosted service containing repositories of images which responds to the Registry API
Assuming you have are using Ubuntu operating system, below are the steps to install Docker:
sudo docker inspect [container_name] # Shows the mounted volume information
One can use docker commands to manage docker containers and images but may get tired typing the commands repeatedly, specially when there are multiple docker instances that needs to be created or destroyed during development or deployed. Docker compose is exactly for this purpose. It can be used to create multiple docker instances. The docker compose looks for docker-compose.yml file where the configurations for creating multiple docker instances are stored.
docker-compose up -d # Starts up all the docker containers specified in docker-compose file
docker-compose logs # Prints the logs from all the containers on to the terminal
docker-compose stop -t 1 # Stops all the containers defined by docker-compose
docker-compose rm # Remove all the containers from memory
A typicla docker-compose file with two images is shown below: