- Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
- Docker is an open source project that automates the deployment of applications inside software containers
- A developer will define all the applications and its dependencies and its requirements which is called as Docker File.
- Docker File can be used to create Docker Images
- When we run docker image, we will get Docker Containers. So docker containers are the run time instances of docker image and these images can also be stored in an online cloud repositories which is Docker Hub
- In Docker Hub , there are many publicly available images and you can store your own docker images as well.
- This image can be pulled to any environment like staging environment or test environment.
- The daemon (server) receives the commands from the Docker client through CLI or REST API's
- Docker client and daemon can be present on the same host (machine) or different hosts
sudo yum -y update
sudo yum install -y docker
docker
docker --version
start docker
sudo service docker start
sudo usermod-a-G docker "user"
docker info
docker run hello-world
: to run hello-world imagedocker images
: to get list of images present locallydocker ps
: to get list of runnig containersdocker ps-a
: to get list of all containers
sudo service docker stop
sudo yum remove docker