docker lxc win
TRANSCRIPT
Docker is an open platform for developers and sysadmins to build, ship, and run
distributed applications
?
• “an open source platform to pack, ship and run any application as a lightweight linux container.”
• “chroot on steroids.”
WHY USE DOCKER?
• Portable deployments.
• Fast Application delivery.
• Scale and deployed with ease.
• Higher workloads - greater density.
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.
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
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
WORKING OF DOCKER
• Docker Registry.
• All images are stored in a client.
• Private or public.
• Images are pulled and pushed in a registry.
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
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
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
IMMUTABLE INFRASTRUCURE
• Immutable infrastructure comprises of immutable components and for every deployment the components will be replaced with the updated component rather than being updated.