A Docker Tutorial for Beginners


A Docker Tutorial for Beginners


In this article, we will be looking into Docker Overview, its architecture benefits and different components of Docker.

What is Docker?


Docker provides a container for managing software workloads on shared infrastructure, all while keeping them isolated from one another.


Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.

Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.

By doing so, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that the machine might have that could differ from the machine used for writing and testing the code. In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system.

Docker allows applications to use the same Linux kernel as the system that they're running on and only requires applications to be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.

Who Is Docker For

Docker is a tool that is designed to benefit both developers and system administrators, making it a part of many DevOps (developers + operations) toolchains.

For developers, it means that they can focus on writing code without worrying about the system that it will ultimately be running on.

It also allows them to get a head start by using one of thousands of programs already designed to run in a Docker container as a part of their application.

For operations staff, Docker gives flexibility and potentially reduces the number of systems needed because of its small footprint and lower overhead.


Benefits of Docker:

·     Docker has the ability to reduce the size of development by providing a smaller footprint of the operating system via containers.
·    With containers, it becomes easier for teams across different units, such as development, QA and Operations to work seamlessly across applications.
·     You can deploy Docker containers anywhere, on any physical and virtual machines and even on the cloud.
·   Since Docker containers are pretty lightweight, they are very easily scalable.

Docker Architecture


Below are a few of the main components of Docker in Docker architecture

Docker Architecture


Docker Container


Docker containers include the application and all of its dependencies, but share the kernel with other containers, running as isolated processes in user space on the host operating system.

Docker containers are not tied to any specific infrastructure: they run on any computer, on any infrastructure, and in any cloud.

Docker containers can be created by either creating a Docker image and then running it or you can use Docker images that are present on the Docker hub. Docker containers are basically run time instances of Docker images.


Docker Engine

Docker is the client-server type of application which means we have clients who relay to the server. So the Docker daemon called: dockerd is the Docker engine which represents the server. The docker daemon and the clients can be run on the same or remote host, and they communicate through command-line client binary, as well as a full RESTful API to interact with the daemon: dockerd.

Docker Image


Docker image is the source of the Docker container. In other words, Docker images are used to create containers.

Images are created with the build command, and they’ll produce a container when started with a run.

Images are stored in a Docker registry such as registry.hub.docker.com because they can become quite large, images are designed to be composed of layers of other images, allowing a minimal amount of data to be sent when transferring images over the network.

Docker Hub

Docker hub is a cloud-based registry service which allows you to link to code repositories, build your images and test them, stores manually pushed images, and links to Docker cloud so you can deploy images to your hosts.

It provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation throughout the development pipeline.

Registries

Docker stores the images we build in registries. There are public and private registries. Docker company has a public registry called Docker hub, where you can also store images privately. Docker hub has millions of images, which you can start using now.




Docker Swarm


Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual Docker host.

Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts.

Purpose of Dockerfile


A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

Using docker build users can create an automated build that executes several command-line instructions in succession.

What makes Docker different from other containers technologies

Docker containers are easy to deploy in a cloud. It can get more applications running on the same hardware as other technologies.

It makes it easy for developers to quickly create, ready-to-run containerized applications and it makes managing and deploying applications much easier. You can even share containers with your applications.



SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
July 20, 2019 at 6:13 PM This comment has been removed by a blog administrator.
avatar