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.