Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker Container |Simplilearn

458 views

Published on

This presentation on Docker Container will help you understand what is Docker, the architecture of Docker, what is a Docker Container, how to create a Docker Container, benefits of Docker Container, basic commands of Containers and you will also see a demo on creating Docker Container. Docker is a very lightweight software container and containerization platform. Docker containers provide a way to run software in isolation. It is an open source platform that helps to package an application and its dependencies into a Docker container for the development and deployment of software and a Docker COntainer is a portable executable package which includes applications and their dependencies. With Docker Containers, applications can work efficiently in different computer environments.

Below DevOps tools are explained in this Docker Container presentation:
1. What is Docker?
2. The architecture of Docker?
3. What is a Docker Container?
4. How to create a Docker Container?
5. Benefits of Docker Containers
6. Basic commands of Containers

Simplilearn's DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. You’ll become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.

Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.

After completing the DevOps training course you will achieve hands-on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools

DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.

Learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training

Published in: Education

What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker Container |Simplilearn

  1. 1. Why Docker Container? Standard Machine Bins/Libs App A App CApp B Host OS Infrastructure
  2. 2. Why Docker Container? App A Bins/Libs App B Bins/Libs Guest OS Guest OS Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Bins/LibsBins/Libs Guest OS App B Bins/Libs Guest OS Bins/Libs Standard Machine Virtual Machine Hypervisor Host OS Infrastructure Bins/Libs App A App CApp B Host OS Infrastructure
  3. 3. Why Docker Container? Docker Container 1 App A Bins/Libs App B Bins/Libs Guest OS Guest OS Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Bins/LibsBins/Libs Guest OS App B Bins/Libs Guest OS Bins/Libs App A Bins/Libs App C Bins/Libs App B Bins/Libs Docker Container 2 Docker Container 3 Standard Machine Virtual Machine Docker Container Docker Engine Host OS Infrastructure Hypervisor Host OS Infrastructure Bins/Libs App A App CApp B Host OS Infrastructure
  4. 4. Why Docker Container? Docker Container 1 App A Bins/Libs App B Bins/Libs Guest OS Guest OS Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Bins/LibsBins/Libs Guest OS App B Bins/Libs Guest OS Bins/Libs App A Bins/Libs App C Bins/Libs App B Bins/Libs Docker Container 2 Docker Container 3 Virtual Machine Docker Container Docker Engine Host OS Infrastructure Hypervisor Host OS Infrastructure Bins/Libs App A App CApp B Host OS Infrastructure Standard Machine
  5. 5. Why Docker Container? Docker Container 1 App A Bins/Libs App B Bins/Libs Guest OS Guest OS Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Bins/LibsBins/Libs Guest OS App B Bins/Libs Guest OS Bins/Libs App A Bins/Libs App C Bins/Libs App B Bins/Libs Docker Container 2 Docker Container 3 Standard Machine Virtual Machine Docker Container Docker Engine Host OS Infrastructure Hypervisor Host OS Infrastructure Bins/Libs App A App CApp B Host OS Infrastructure Note: Application A works fine along with its dependency (Bins/Libs), but Application B and C will not work as it doesn’t have its dependencies
  6. 6. Why Docker Container? Docker Container 1 App A Bins/Libs App B Bins/Libs Guest OS Guest OS Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Bins/LibsBins/Libs Guest OS App B Bins/Libs Guest OS Bins/Libs App A Bins/Libs App C Bins/Libs App B Bins/Libs Docker Container 2 Docker Container 3 Standard Machine Virtual Machine Docker Container Docker Engine Host OS Infrastructure Hypervisor Host OS Infrastructure Bins/Libs App A App CApp B Host OS Infrastructure Note: Guest OS occupies more space and leads to unstable performance
  7. 7. Why Docker Container? App A Bins/Libs App B Bins/Libs Guest OS Guest OS Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Bins/LibsBins/Libs Guest OS App B Bins/Libs Guest OS Bins/Libs Docker Container 1 App A Bins/Libs App C Bins/Libs App B Bins/Libs Docker Container 2 Docker Container 3 Standard Machine Virtual Machine Docker Container Docker Engine Host OS Infrastructure Hypervisor Host OS Infrastructure Bins/Libs App A App CApp B Host OS Infrastructure Note: Unlike Virtual machine, Containers are efficient and are easily portable across different platforms
  8. 8. Why Docker Container? App A Bins/Libs App B Bins/Libs Guest OS Guest OS Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Bins/LibsBins/Libs Guest OS App B Bins/Libs Guest OS Bins/Libs Standard Machine Virtual Machine Docker Container Docker Engine Host OS Infrastructure Hypervisor Host OS Infrastructure Bins/Libs App A App CApp B Host OS Infrastructure Hypervisor Docker Container 1 App A Bins/Libs App C Bins/Libs App B Bins/Libs Docker Container 2 Docker Container 3
  9. 9. Why Docker Container? Docker Container 1 Docker Engine Host OS Infrastructure App A Bins/Libs App C Bins/Libs App B Bins/Libs Docker Container 2 Docker Container 3 Docker Container 1 Docker Engine Host OS Infrastructure Docker Container 2 Docker Container 3 For example:
  10. 10. Let’s take an example where a company develops a Java Application Why Docker Container? A developer will setup a JBoss software on his system Developer
  11. 11. Let’s take an example where a company develops a Java Application Why Docker Container? A developer will setup a JBoss software on his system After the application is developed, it is examined by the testing team Here, the tester repeats the installation process of JBoss Developer Tester
  12. 12. Let’s take an example where a company develops a Java Application Why Docker Container? A developer will setup a JBoss software on his system After the application is developed, it is examined by the testing team Here, the tester repeats the installation process of JBoss To host the Java application, the system admin also has to install JBoss on his system Developer Tester System admin Once the application is tested, it will be deployed by the production team
  13. 13. Let’s take an example, where a company develops a Java Application In order to do so a software programmer will setup an JBoss server on his system After the application is developed it has to be tested by the testing team For which the tester will have to repeat the set up process of JBoss in order to test the application As soon the testing is finished, it will be deployed to the production team Once again the production team requires an environment with JBoss installed on their system, so that it can host the Java application Developer Tester Production Why is the same Jboss installation done thrice?? Why Docker Container?
  14. 14. Let’s take an example, where a company develops a Java Application In order to do so a software programmer will setup an JBoss server on his system After the application is developed it has to be tested by the testing team For which the tester will have to repeat the set up process of JBoss in order to test the application As soon the testing is finished, it will be deployed to the production team Once again the production team requires an environment with JBoss installed on their system, so that it can host the Java application Developer Tester Production due to the difference in computer environments, Jboss doesn’t work on the other systems, so installation is done separately on three different Why Docker Container?
  15. 15. Let’s take an example, where a company develops a Java Application In order to do so a software programmer will setup an JBoss server on his system After the application is developed it has to be tested by the testing team For which the tester will have to repeat the set up process of JBoss in order to test the application As soon the testing is finished, it will be deployed to the production team Once again the production team requires an environment with JBoss installed on their system, so that it can host the Java application Developer Tester Production But this process consumes a lot time and effort. can there be an alternate way to this? due to the difference in computer environments, Jboss doesn’t work on the other systems, so installation is done separately on three different computers Why Docker Container?
  16. 16. Let’s take an example, where a company develops a Java Application In order to do so a software programmer will setup an JBoss server on his system After the application is developed it has to be tested by the testing team For which the tester will have to repeat the set up process of JBoss in order to test the application As soon the testing is finished, it will be deployed to the production team Once again the production team requires an environment with JBoss installed on their system, so that it can host the Java application Developer Tester Production But this process consumes a lot time and effort. can there be an alternate way to this? due to the difference in computer environments, Jboss doesn’t work on the other systems, so installation is done separately on three different computers Why not try Docker Containers? Why Docker Container?
  17. 17. What’s in it for you?  What is Docker?  Architecture of Docker  What is a Docker Container?  How to create a Docker Container?  Benefits of Docker Containers  Basic Commands of Containers  Demo Let’s get started
  18. 18. What is Docker?
  19. 19. What is Docker? Docker is an open source platform that helps a user to package an application and it’s dependencies into a Docker Container for the development and deployment of software Docker Container
  20. 20. What is Docker? Docker is an open source platform that helps a user to package an application and it’s dependencies into a Docker Container for the development and deployment of software Build Developer Ship Docker Container Run Tester
  21. 21. What is Docker? Docker is an open source platform that helps a user to package an application and it’s dependencies into a Docker Container for the development and deployment of software Build Developer Ship Docker Container Run Tester Before starting with Docker containers, let’s understand the architecture of Docker
  22. 22. Architecture of Docker
  23. 23. Architecture of Docker Docker Client Docker Host Docker Daemon Docker Registry ImagesContainer Container REST API Docker Client Docker Daemon REST API Docker Engine
  24. 24. Architecture of Docker Docker Client Docker Host Docker Daemon Docker Registry ImagesContainer Container REST API Docker Client is a service which uses REST API to send commands to Docker Daemon through CLI commands
  25. 25. Architecture of Docker Docker Client Docker Host Docker Daemon Docker Registry ImagesContainer Container REST API Docker Client is a service which uses REST API to send commands to Docker Daemon through CLI commands Docker Daemon checks the client request and communicates with the Docker components in order to perform a service
  26. 26. Architecture of Docker Docker Client Docker Host Docker Daemon Docker Registry ImagesContainer Container REST API Docker Client is a service which uses REST API to send commands to Docker Daemon through CLI commands Docker Daemon checks the client request and communicates with the Docker components in order to perform a service A Docker Image is a file of instructions which is used to create Containers
  27. 27. Architecture of Docker Docker Client Docker Host Docker Daemon Docker Registry ImagesContainer Container REST API Docker Container is a portable executable package which includes applications and their dependencies
  28. 28. Architecture of Docker Docker Client Docker Host Docker Daemon Docker Registry ImagesContainer Container REST API Docker Container is a portable executable package which includes applications and their dependencies Docker Registry is a service used for hosting and distributing Docker images among users
  29. 29. What is a Docker Container?
  30. 30. What is a Docker Container? • Docker Container is an executable software package that includes all dependencies (frameworks, libraries, etc.) required to execute an application • With Docker Containers, applications can work efficiently in different computer environments Docker Container
  31. 31. What is a Docker Container? • Docker Container is an executable software package that includes all dependencies (frameworks, libraries, etc.) required to execute an application • With Docker Containers, applications can work efficiently in different computer environments Applications run in isolation Docker Container
  32. 32. What is a Docker Container? • Docker Container is an executable software package that includes all dependencies (frameworks, libraries, etc.) required to execute an application • With Docker Containers, applications can work efficiently in different computer environments Applications run in isolation Occupies less space Docker Container
  33. 33. What is a Docker Container? • Docker Container is an executable software package that includes all dependencies (frameworks, libraries, etc.) required to execute an application • With Docker Containers, applications can work efficiently in different computer environments Applications run in isolation Lightweight Occupies less space Docker Container
  34. 34. What is a Docker Container? • Docker Container is an executable software package that includes all dependencies (frameworks, libraries, etc.) required to execute an application • With Docker Containers, applications can work efficiently in different computer environments Applications run in isolation Lightweight Secure Occupies less space Docker Container
  35. 35. What is a Docker Container? • Docker Container is an executable software package that includes all dependencies (frameworks, libraries, etc.) required to execute an application • With Docker Containers, applications can work efficiently in different computer environments Applications run in isolation Lightweight Secure PortableOccupies less space Docker Container
  36. 36. What is a Docker Container? • Docker Container is an executable software package that includes all dependencies (frameworks, libraries, etc.) required to execute an application • With Docker Containers, applications can work efficiently in different computer environments Applications run in isolation Lightweight Secure Portable Short boot-up time Occupies less space Docker Container
  37. 37. How to create a Docker Container?
  38. 38. How to create a Docker Container? Docker File Docker Image Note: A Docker File is a text file which contains commands for building a Docker Image • Docker File creates a Docker Image using the build command
  39. 39. How to create a Docker Container? Docker File Docker Image Project code • Docker File creates a Docker Image using the build command • A Docker Image contains of all the project’s code
  40. 40. How to create a Docker Container? Docker File Docker Container Docker Image • Docker File creates a Docker Image using the build command • A Docker Image contains of all the project’s code • With Docker Image, a user can run the code in order to create Docker Containers Note: Command to run a Docker Container is Docker run <image-id>
  41. 41. How to create a Docker Container? Docker File Docker Container Docker Image Docker Registry • Once the Docker Image is created, it can be stored in the Docker Registry using Docker push command (Docker push image_name)
  42. 42. How to create a Docker Container? Docker File Docker Container Docker Image Docker Registry Docker Hub Repository • Once the Docker Image is created, it can be stored in the Docker Registry using Docker push command (Docker push image_name) • When a Docker Image is created, it gets stored in a Docker Hub or in a Repository
  43. 43. How to create a Docker Container? Docker File Docker Container Docker Image Note: Docker also has its own default Registry called Docker Hub Docker Registry Docker Hub Repository • Once the Docker Image is created, it can be stored in the Docker Registry using Docker push command (Docker push image_name) • When a Docker Image is created, it gets stored in a Docker Hub or in a Repository
  44. 44. How to create a Docker Container? Docker File Docker Container Docker Image Docker Hub Repository Docker Registry • There are multiple Docker images available in the registry and all can be retrieved through the Docker pull command (e.g. Docker pull image_name) Note: In Docker Registry, repository is a collection of Docker Images
  45. 45. • There are multiple Docker images available in the registry and all can be retrieved through the Docker pull command (e.g. Docker pull image_name) • Once a Docker Image is retrieved from the Docker Registry, a user can build new Containers How to create a Docker Container? Docker File Docker Container Docker Image Container Container Docker Registry
  46. 46. • There are multiple Docker images available in the registry and all can be retrieved through the Docker pull command (e.g. Docker pull image_name) • Once a Docker Image is retrieved from the Docker Registry, a user can get the Docker Image and build new Containers How to create a Docker Container? Docker File Docker Container Docker Image Container Container Docker Registry Now, Let’s create a Container using basic Docker commands
  47. 47. How to create a Docker Container? Docker Daemon Docker Registry REST API Image Docker Host Note: Docker uses Docker images to run your code, not the Dockerfile build push In Docker, a Dockerfile is used to build the image using build command and that image is stored into the registry using push command Docker Client Build Push Pull Run
  48. 48. How to create a Docker Container? When you run pull command, Docker Image (NGNIX) is retrieved from the registry Docker Daemon Docker Registry REST API pull Image Image Docker Host Docker Client Build Push Pull Run push In Docker, a Dockerfile is used to build the image using build command and that image is stored into the registry using push command build
  49. 49. How to create a Docker Container? Finally, a single Container (NGNIX) is built using Docker Image through the run command Docker Daemon Docker Registry REST API pull Image ImageContainer run Docker Client Docker Host Build Push Pull Run push In Docker, a Dockerfile is used to build the image using build command and that image is stored into the registry using push command When you run pull command, Docker Image (NGNIX) is retrieved from the registry build
  50. 50. How to create a Docker Container? DID YOU KNOW? • When a Container is created, a new layer is formed on top of the Docker Image layers called Container layer • Each Container has a separate (R/W) Container layer and any changes made in a Docker Container is reflected upon the particular Container layer • In case a Container is deleted, the Container layer also gets deleted Note: Docker Image has multiple image layers and each Image layer is created by executing each command in the Dockerfile
  51. 51. Benefits of Containers
  52. 52. Benefits of Containers Containers have no external dependency for applications to run
  53. 53. Benefits of Containers Container Containers have no external dependency for applications to run As Containers are light-weight, they are easily shipped (deployed) to other computers and get executed on other computer environments regardless of their host operating systems
  54. 54. Benefits of Containers Containers have no external dependency for applications to run Data volumes can be shared and reused among multiple ContainersContainer As Containers are light-weight, they are easily shipped (deployed) to other computers and get executed on other computer environments regardless of their host operating systems
  55. 55. Benefits of Containers Data volumes can be shared and reused among multiple Containers As Containers are light-weight, they are easily shipped (deployed) to other computers and get executed on other computer environments regardless of their host operating systems Container Containers run applications in isolation and also share the OS kernel with other Containers os Containers have no external dependency for applications to run
  56. 56. Is it possible to run multiple Containers together without the need to start each one individually?Well, it’s possible with Docker compose !
  57. 57. Docker Compose Docker Compose can be used to run multiple Containers in a single service For example Consider an instance where you have an application which requires Apache Tomcat and redis. Now, you can easily create one Docker Compose file to run both Containers in a single service Docker Compose file
  58. 58. Basic Docker Container commands
  59. 59. Basic Docker Container commands Basic commands for Docker • Docker Container commit • Docker Container cp • Docker Container prune • Docker Container kill • Docker Container exec • Docker Container ls • Docker Container rm • Docker Container restart - Command to create a new Docker image from the changes made in Container - Command to copy files between the local filesystem and a Docker Container - Command to remove all stopped Containers - Command to terminate one or more running Containers - Command to run a new command in a running Container - Command to list Docker Containers - Command to remove one or more Containers - Command to restart one or more Containers
  60. 60. Other fields that use Blockchain Blockchain has been used in other industries as well. Some examples of this are: To ease the verification of documents To stop music piracy and to compensate artists for purchased songs Data integrity can be guaranteed. There cannot be a single point of failure Verification of identity of employee, history, etc. Payment and benefit process validation Travel Music Cybersecurity Human Resources

×