2. What, Why, When
What is a Docker
• A docker is a separate isolated environment for running an application
Why Docker
All the required files and instructions of an application comes into a single image
which makes sharing and running application among different devices easier
When to use
When you want to run your application in different environments
5. Docker Architecture
• Docker uses client - server Architecture
• Client will be the docker application which we are
running
• Server will the Docker server - docker daemon
• Communication between client and server will be
through RESTful API
7. Docker Image
• A Docker image contains application code, instructions to run the application and other
files needed to make an application run.
• docker image is a template with instructions which is used for creating containers
• Docker image is build based on the instructions given in Dockerfile or docker-compose
• A docker image can be stored in a docker hub or in a private repo
• An image is built up on a base image
8. Docker Container
• When you runs an image, it can become one or many instances of a container.
• A Docker container is a lightweight, standalone, executable package of software
that includes everything needed to run an application
9. Dockerfile and Docker-Compose
Dockerfile
• A Dockerfile is a text document that contains all the commands to assemble an image
• Based on these commands our application image will be generated once the application is built
Docker - Compose
• Docker-compose is a feature which can be installed when we are installing docker or separately
• Same as Dockerfile docker-compose provides advanced features to write instructions
• These commands are written in yml file
• Docker-compose will have its own CLI commands
11. Docker registry
• Docker registry is a service used for hosting and sharing images
• Some of the Docker registry are
• Docker hub
• ECR
12. Docker vs VM
VM Docker
Vm needs hyper-visor to manage vms in a
machine
Docker uses Docker engine
The main difference between docker and the vm is there is no need of guest os in Docker
Requires more memory Requires less memory
Long boot-up time Short boot-up time
Difficult to scale up Easy setup
Low efficiency High efficiency
Hard to share Hard to share
Both are virtualization tools
VM virtualize both application layer and Kernel
layer
Docker virtualize application layer and uses os’s
kermel