Thursday, July 9, 2020

What Is Docker Docker Container

What Is Docker Docker Container What Is Docker Docker Container ? A Deep Dive Into Docker ! Back Home Categories Online Courses Mock Interviews Webinars NEW Community Write for Us Categories Artificial Intelligence AI vs Machine Learning vs Deep LearningMachine Learning AlgorithmsArtificial Intelligence TutorialWhat is Deep LearningDeep Learning TutorialInstall TensorFlowDeep Learning with PythonBackpropagationTensorFlow TutorialConvolutional Neural Network TutorialVIEW ALL BI and Visualization What is TableauTableau TutorialTableau Interview QuestionsWhat is InformaticaInformatica Interview QuestionsPower BI TutorialPower BI Interview QuestionsOLTP vs OLAPQlikView TutorialAdvanced Excel Formulas TutorialVIEW ALL Big Data What is HadoopHadoop ArchitectureHadoop TutorialHadoop Interview QuestionsHadoop EcosystemData Science vs Big Data vs Data AnalyticsWhat is Big DataMapReduce TutorialPig TutorialSpark TutorialSpark Interview QuestionsBig Data TutorialHive TutorialVIEW ALL Blockchain Blockchain TutorialWhat is BlockchainHyperledger FabricWhat Is EthereumEthereum TutorialB lockchain ApplicationsSolidity TutorialBlockchain ProgrammingHow Blockchain WorksVIEW ALL Cloud Computing What is AWSAWS TutorialAWS CertificationAzure Interview QuestionsAzure TutorialWhat Is Cloud ComputingWhat Is SalesforceIoT TutorialSalesforce TutorialSalesforce Interview QuestionsVIEW ALL Cyber Security Cloud SecurityWhat is CryptographyNmap TutorialSQL Injection AttacksHow To Install Kali LinuxHow to become an Ethical Hacker?Footprinting in Ethical HackingNetwork Scanning for Ethical HackingARP SpoofingApplication SecurityVIEW ALL Data Science Python Pandas TutorialWhat is Machine LearningMachine Learning TutorialMachine Learning ProjectsMachine Learning Interview QuestionsWhat Is Data ScienceSAS TutorialR TutorialData Science ProjectsHow to become a data scientistData Science Interview QuestionsData Scientist SalaryVIEW ALL Data Warehousing and ETL What is Data WarehouseDimension Table in Data WarehousingData Warehousing Interview QuestionsData warehouse architectureTalend T utorialTalend ETL ToolTalend Interview QuestionsFact Table and its TypesInformatica TransformationsInformatica TutorialVIEW ALL Databases What is MySQLMySQL Data TypesSQL JoinsSQL Data TypesWhat is MongoDBMongoDB Interview QuestionsMySQL TutorialSQL Interview QuestionsSQL CommandsMySQL Interview QuestionsVIEW ALL DevOps What is DevOpsDevOps vs AgileDevOps ToolsDevOps TutorialHow To Become A DevOps EngineerDevOps Interview QuestionsWhat Is DockerDocker TutorialDocker Interview QuestionsWhat Is ChefWhat Is KubernetesKubernetes TutorialVIEW ALL Front End Web Development What is JavaScript â€" All You Need To Know About JavaScriptJavaScript TutorialJavaScript Interview QuestionsJavaScript FrameworksAngular TutorialAngular Interview QuestionsWhat is REST API?React TutorialReact vs AngularjQuery TutorialNode TutorialReact Interview QuestionsVIEW ALL Mobile Development Android TutorialAndroid Interview QuestionsAndroid ArchitectureAndroid SQLite DatabaseProgramming Docker Co... Docker (9 Blogs) Become a Certified Professional AWS Global Infrastructure Introduction To DevOps What is DevOps? A Beginner's Guide To Understanding DevOps And Its EvolutionWhat Are Important Pre-Requisites For DevOps Professionals?DevOps in various domains â€" How DevOps solves the problem?DevOps Real Time Scenarios â€" Know What Happens Real TimeWaterfall vs Agile: Which Is Better For You And Why?DevOps vs Agile! Everything You Need To KnowMystery of DevOpsInfrastructure as Code â€" What is it and Why is it it important?Linux commands in DevOps: Must Know For Every DevOps ProfessionalDevOps Tutorial : Introduction To DevOpsTop 10 DevOps Tools You Must Know In 2020Understanding DevOps Tools Development, Testing Deployment Technologies Involved In DevOps Git Docker Container ? A Deep Dive Into Docker ! Last updated on May 22,2019 79.2K Views Vineet Chaturvedi 9 Comments Bookmark 3 / 11 Blog from Docker Become a Certified Professional In the previous blog written by our Docker Training expert, we took you through the necessity of Docker and madeyou acquainted with Docker.In case you havemissed to go through the first blog on Docker please go through this Docker Explained blog.In this blog, I will explain What is Docker Docker Container in detail.Before we go ahead, let me summarize the learning till now:Virtual Machines are slow and take a lot of time to boot.Containers are fast and boots quickly as it uses host operating system and shares the relevant libraries.Containers do not waste or block host resources unlike virtual machines.Containers have isolated libraries and binaries specific to the application they are running.Containers are handled by Containerization engine.Docker is one of the containerization platforms which can be used to create and run containers.Now, after this recap, let me take you aheadand explore more on What is Docker ?What is Docker Docker Container ?What is Docker ? Docker is a containerization platform that packages your a pplication and all its dependencies together in the form of a docker container to ensure that your application works seamlessly in any environment.What is Container ? Docker Container is a standardized unit which can be createdon the fly to deploy a particular application or environment. It could be an Ubuntu container, CentOs container, etc. to full-fill the requirement from an operating system point of view. Also, it could be an application oriented container likeCakePHP container or a Tomcat-Ubuntu container etc.Lets understand it with an example:A companyneeds to developa Java Application. In order to do so the developer will setup an environment with tomcat server installed in it. Once the application is developed, it needs to be tested by the tester. Nowthe tester will again set up tomcat environment from the scratch to test the application. Oncethe application testing is done, it will be deployed on the production server. Again the production needs an environment with tomcat installed on it, so that it can host the Java application. If you see the same tomcat environment setup is done thrice. There are some issues that I have listed below with this approach:1) There is a loss of time and effort.2) There could be a version mismatch in different setups i.e. the developer tester may have installed tomcat 7, however the system admin installed tomcat 9 on the production server.Now, I will show you how Docker container can be used to preventthis loss.In this case, the developer willcreate a tomcat docker image ( A Docker Image is nothing but a blueprint to deploy multiple containers of the same configurations )using a base image like Ubuntu, which is already existing in Docker Hub (Docker Hub has some base docker images available for free) . Now this image can be used by the developer, the tester and the system admin to deploy the tomcat environment. This is how docker container solves the problem.I hope you are now clear on What is Docker Docker Container . In case you have any further doubts, please feel to leave a comment, I will be glad to help you. However, now you would think that this can be done using Virtual Machines as well. However, there is catch if you choose to use virtual machine.Lets see a comparison between a Virtual machine and Docker Container to understand this better.Let me take you through the above diagram. Virtual Machine and Docker Container are compared on the following three parameters:Size This parameter will compare Virtual Machine Docker Container on their resource they utilize.Startup This parameter will compare on the basis of their boot time.Integration This parameter will compare on their ability to integrate with other tools with ease.I will follow the above order in whichparameters are listed. So first parameter would be Size.Check out this video to know more about Docker.What is Docker | DevOps Training | EdurekaSizeThe following image explains how Virtual Machine and Docker Container utilizes the resources allocated to them.Consider a situation depicted in the above image. I have a host system with 16 Gigabytes of RAM and I have to run 3 Virtual Machines on it. To run the Virtual Machines in parallel, I need to divide my RAM among the Virtual Machines. Suppose I allocate it in the following way:6 GB of RAM to my first VM,4 GB of RAM to my second VM, and6 GB to my third VM.In this case,I will not be left with anymore RAM even though the usage is:Myfirst VM uses only 4 GB of RAM Allotted 6 GB 2 GB Unused BlockedMy second VM uses only 3 GB of RAM Allotted 4 GB 1 GBUnused BlockedMy third VM uses only 2 GB of RAM Allotted 6 GB 4 GB Unused BlockedThis is because once a chunk of memory is allocated to a Virtual Machine, then that memory is blocked and cannot be re-allocated. I will be wasting 7 GB (2 GB + 1 GB + 4 GB) of RAM in total and thus cannot setup a new Virtual Machine. This is a major issue because RAM is a costly hardware.So, how can I avoid this problem?If I use Docker, my CPU will allocates exactly the amount of memory that is requiredbythe Docker Container.My first container will use only 4 GB ofRAM Allotted 4 GB 0GB Unused BlockedMy second container will use only 3 GB of ofRAM Allotted 3GB 0GB Unused BlockedMy third container will use only 2 GB ofRAM Allotted 2GB 0GB Unused BlockedSince there is no allocated memory (RAM)which isunused, I save 7 GB (16 4 3 2) of RAM by using Docker Container. I can even create additional containers from the leftover RAM and increase my productivity.So here Docker Container clearly wins over Virtual machine as I can efficiently use my resources as per my need.Start-UpWhen it comes to start-up, Virtual Machine takes a lot of time to boot up because the guest operating system needs to start from scratch, which will then load all the binaries and libraries. This is time consuming and will prove very costly at times when quick startup of applications is needed. In case of Docker Container, sin ce the container runs on your host OS, you can save precious boot-up time. This is a clear advantage over Virtual Machine. Consider a situation where I want to install two different versions of Ruby on my system. If I use Virtual Machine, I will need to set up 2 different Virtual Machines to run the different versions. Each of these will have its own set of binaries and libraries while running on different guest operating systems. Whereas if I use Docker Container, even though I will be creating 2 different containers where each container will have its own set of binaries and libraries, I will be running them on my host operating system. Running them straight on my Host operating system makes my Docker Containers lightweight and faster.So Docker Container clearly wins again from Virtual Machine based on Startup parameter.Now, finally let us consider the final parameter, i.e. Integration.What about Integration?Integration of different tools using Virtual Machine maybe possible, but e ven that possibility comes with a lot of complications.I can have only a limited number of DevOps tools running in a Virtual Machine. As you can see in the imageabove, If I want many instances of Jenkins and Puppet, then I would need to spin up many Virtual Machines because each can have only one running instance of these tools. Setting up each VM brings with it, infrastructure problems. I will have the same problem if I decide to setup multiple instances of Ansible, Nagios, Selenium and Git. It will also be a hectic task to configure these tools in every VM.This is where Docker comes to the rescue. Using Docker Container, we can set up many instances of Jenkins, Puppet, and many more, all running in the same container or running in different containers which can interact with one another by just running a few commands. I can also easily scale up by creating multiple copies of these containers. So configuring them will not be a problem.To sum up, it wont be an understatement to say that Docker is a more sensible option when compared to Virtual Machines.Docker is designed to benefit both Developers and System Administrators, making it a part of many DevOps toolchains. Developers can write their code without worrying about the testing or the production environment and system administrators need not worry about infrastructure as Docker can easily scale up and scale down the number of systems for deploying on the servers.What is Docker Engine?Now I will take you through Docker Engine which is the heart of the Docker system. Docker Engine is simply the docker application that is installed on your host machine. It works like a client-server application which uses:Aserverwhich is a type of long-running program called a daemon processA command line interface (CLI)clientREST API is used for communication between the CLI client and Docker DaemonAs per the above image, in a Linux Operating system, there is a Docker client which can be accessed from the terminal and a Doc ker Host which runs the Docker Daemon. We build our Docker images and run Docker containers by passing commands from the CLI client to the Docker Daemon. However, in case of Windows/Mac there is an additional Docker Toolbox component inside the Docker host. This Docker Toolbox is an installer to quickly and easily install and setup a Docker environment on your Windows/iOS. Docker Toolbox installs Docker Client, Machine, Compose (Mac only), Kitematic and VirtualBox.Lets now understand three important terms, i.e. Docker Images, Docker Containers and Docker Registry.What is Docker Image?Docker Image can be compared to a template which is used to create Docker Containers. They are the building blocks of a Docker Container. These Docker Images are created usingthe build command. These Read only templates are used for creating containers by using the run command. We will explore Docker commands in depth in the Docker Commands blog.Docker lets people (or companies) create and share softwar e through Docker images. Also, you dont have to worry about whether your computer can run the software in a Docker image a Docker containercan always run it.I can either use a ready-made docker image from docker-hub or create a new image as per my requirement.In the Docker Commands blog we will see how to create your own image.What is Docker Container? Containers are the ready applications created from Docker Images or you can say a Docker Container is a running instance of a Docker Image and they hold the entire package needed to run the application. This happens to be the ultimateutility of Docker.What is Docker Registry?Finally, Docker Registry is where theDocker Images are stored. The Registry can be either a users local repository or a public repository like a Docker Hub allowing multiple users to collaborate in building an application. Even with multiple teams within the same organization can exchange or share containers by uploading them to the Docker Hub. Docker Hub is Dock ers very own cloud repository similar to GitHub.What is Docker Architecture?Docker Architecture includesa Docker client used to trigger Docker commands, a Docker Host running the Docker Daemon and a Docker Registry storingDocker Images. The Docker Daemon running within Docker Host is responsible for the images and containers.To build a Docker Image, we can use the CLI (client) to issue a build command to the Docker Daemon (running on Docker_Host). The Docker Daemon will then build an image based on our inputs and save it in the Registry, which can be either Docker hub or a local repositoryIf we do not want to create an image, then we can just pull an image from the Docker hub, which would have been built by a different userFinally, if we have to create a running instance of my Docker image, we can issue a run command from the CLI, which will create a Docker Container. This is the simple functionality of Docker :).I hope you enjoyed, What is Docker and Docker Container blog. Now y ou are ready to get hands on with Docker.For hands on soon I will come up withthe third blog in Docker Tutorial onDocker Commands.Now that you have understood what is DevOps, check out theDevOps training by Edureka,a trusted online learning companywith a network of more than250,000satisfied learnersspread acrossthe globe. The Edureka DevOps Certification Training coursehelps learners gain expertise in various DevOps processes and tools such as Puppet, Jenkins, Nagios, Ansible, Chef, Saltstack and GIT for automating multiple steps in SDLC.Got a question for us? Please mention it in the comments section and we will get back to you.Recommended videos for you Continuous Integration With Jenkins Watch Now What is Git A Complete Git Tutorial For Beginners Watch Now DevOps Tutorial For Beginners Watch Now Devops : Automate Your Infrastructure With Puppet Watch Now DevOps is Going to Replace SDLC! Learn Why Watch Now What is Docker DevOps Tool For Containerization Watch Now What is DevOps A Beginners Guide To DevOps Watch Now Ansible Tutorial For Beginners Ansible Playbook Watch Now Puppet Tutorial DevOps Tool For Configuration Management Watch Now Top DevOps Interview Questions And Answers Watch Now What is Jenkins? Continuous Integration With Jenkins Watch Now 5 Best Practices In DevOps Culture Watch Now DevOps-Redefining your IT Strategy Watch NowRecommended blogs for you Jenkins vs Jenkins X Know how Jenkins X differs from Jenkins Read Article Top 50 Kubernetes Interview Questions You Must Prepare In 2020 Read Article What Is Git ? Explore A Distributed Version Control Tool Read Article DevOps Roles: Which Of Them Is Your Dream? Read Article Setting Up Development Environment Using Vagrant Read Article What Is Docker Docker Container ? A Deep Dive Into Docker ! Read Article Ansible for AWS Managing Cloud Made Easy Read Article Chef vs Puppet vs Ansible vs Saltstack: Which Works Best For You? Read Article Install Git Git Installation On Windows And CentOS Read Article CI CD Pipeline Learn how to Setup a CI CD Pipeline from Scratch Read Article DevOps Life cycle: Everything You Need To Know About DevOps Life cycle Phases Read Article DevOps Periodic Table : The Ultimate Cheat Sheet Read Article Ansible Provisioning: Smarter and Effortless way of Provisioning Read Article Kubernetes vs Docker: Comparing The Two Container Orchestration Giants! Read Article Top Chef Interview Questions All You Need To Know About Chef In 2020 Read Article Docker Tutorial Introduction To Docker Containerization Read Article How to use Git Log to format the commit history? Read Article Top Puppet Interview Questions For 2020 All You Need To Know About Puppet Read Article What is Docker Container? Containerize Your Application Using Docker Read Article How to use Puppet Modules for IT Infrastructure Automation? Read Article Comments 9 Comments Trending Courses in DevOps DevOps Certification Training72k Enrolled LearnersWeekend/WeekdayLive Class Rev iews 5 (28700)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.