15. DOCKER
âą Client Server Architecture.
âą Socket or REST APIs
âą Docker Daemon
âą All container operations
âą Docker Client
âą Main interface between user
and docker daemon.
âą Docker Internal Components.
16. DOCKER COMPONENTS
âą Docker Internal Components
âą Docker Image
âą Similar to OS disk images.
âą Used as base , layers build upon the base image[Layer
0].
âą Portable.
âą Docker Registry
âą Repository of Docker Images.
âą Public or Private.
âą Docker Containers
âą Running Images
âą Directory + Execution Environment.
âą Isolated.
âą User Space + Networking + Security Components.
Docker
Image
Kernal
Docker
Engine
Docker
Registr
y
Docker
Container
17. WORKING OF DOCKER
âą Docker Image.
âą Each image is
association of images.
âą Layered approach for
abstraction.
âą Unified file system.
Each layer as a
directory.
âą Dockerfile.
Base Image
Layered Image-2[add
apache]
Running Container [php
application
Layered Image-2[add php]
Layered Image-3[add mysql]
Reference Image
18. WORKING OF DOCKER
âą Docker Registry.
âą All images are stored
in a client.
âą Private or public.
âą Images are pulled and
pushed in a registry.
19. WORKING OF DOCKER
âą Docker Container.
âą Run time environment.
âą Command from REST
API/Docker Binary to
run the container.
âą sudo docker run -i -t
ubuntu /bin/ bash
Docker client
Docker Daemon
Container
Pulled Image
REPOSITORY
Creates Containers from Image
Binary API Request
20. DOCKER
âą sudo docker run -i -t ubuntu /bin/ bash
âą Docker client will be launched with
âdocker runâ command.
âą It tells the daemon, from which
image the container should be
created. In our example, it is a
Ubuntu image.
âą â-iâ tells the Docker daemon to run
the container in interactive mode.
âą â-tâ represents tty mode for
interactive session.
âą â/ bin/ bashâ tells the Docker
daemon to start the bash shell when
the container is launched.
Docker client
Docker Daemon
Container
Pulled Image
REPOSITORY
Creates Containers from Image
Binary API Request
21. DOCKER
âą Successful Execution of run.
âą Checks for the image.
âą Pulls the image to create a container.
âą Creates a read/write filesystem over
the image.
âą Creates a network interface for the
container to interact with host
machine.
âą Checks for IP . Allocates IP.
âą Executes the command specified.
âą Logs.
Docker client
Docker Daemon
Container
Pulled Image
REPOSITORY
Creates Containers from Image
Binary API Request
23. DEMO
âą A static web application
running on apache.
âą A mysql Image.
âą Wordpress application with
MYSQL db.
âą Hosting multiple websites
on docker host.
âą Building and testing
containers using Jenkins CI.