Docker is an Open Source Centralized PaaS (Platform as a Service) that uses O.S. level virtualization to create, deploy and run applications in packages known as Containers.
It was first release on March, 2013 written on GO language by Solomon Hykes and Sebastian.
To setup docker in AWS (Linux)
Here is the list of some basic docker commands.
But before Docker, everyone were using VMware. So what is the need to introduce docker ?
Before Docker came into effect, industries were facing many issues regarding the testing of the applications. Suppose the development team has build an application in a particular environment where they have all the required packages and updates but when the same application is given to testing team they started facing problem because they have to create a same environment like development team to test those applications. Thus to overcome this, here comes the need of DOCKER which helps us to virtualize our system as the same way we want without changing our default system’s environment.
Hypervisor :- It is a software or firmware that creates and run virtual machines. Also called VMM (Virtual Machine Manager).
Docker Daemon :- It runs on host O.S. and responsible to run containers to manage the services.
Besides this Docker has also other Advantages over VMware:-
- No pre-allocation of RAM. It will use the RAM of hardware as per the need and that too when you will allocate it to the container that’s why you can create as many containers as you want but in VMware you have to pre-allocate your RAM and have to create containers* as per the limitation of RAM only.
- It is less costly and light in weight. It can run on physical hardware, virtual hardware or even on cloud.
- It takes very less time to create the containers and also you can re-use the images**.
- C.I. Efficiency :- Docker enables you to build a container image and use that same image across every step of your deployment process.
- * Containers :- It is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
- *Images :- It is basically a copy of a software, packages, operating systems, containers etc. It is used to save the time of developers and operational teams as suppose ops team want the same environment as of dev teams then, the dev team will create a copy(Image) of their environment and provide it to the ops team.
There are basically two methods to create an image of a container :-
But every tech thing has its own pros and cons. So now lets look for some of the Disadvantages too :-
- It is not a good solution for application that requires rich GUI.
- It doesn’t provide a cross-platform compatibility.
- No solution for data recovery and backup if all the containers get deleted.
- Sometimes difficult to manage large amount of containers.
Workflow of Docker :-
From the image given above we can clearly depicts that how do we perform on Docker on our daily basis. Firstly a developer creates a Dockerfile or write some commands to create a container from the image pulled from docker hub and then after we have completed our work or created the environment successfully then we can again push that image of our container to the Docker Hub so that others may use it too.
Docker Volume :-
Volume is simply a directory or a folder inside our container that act as storage folder to store all your softwares , packages, images, files and all other stuffs.
We can also share the volume between as many containers as we want and benefit of doing this is there will be only one volume dir and all the other containers will store their packages in that dir and everyone can see what package is added to that volume dir and from which container.
Volume mapping can be done between
- Host and Container
- Container to Container
Benefits of using Volume :-
- Decoupling from Storage.
- Share volume among different containers
- Attach volume to containers
- On deleting containers, volume does not deletes
Ways of Creating a Volume :-
To create your container access globally you have to learn port expose but it is not possible to write it down about it here but the process of doing is 👇 👇
NOTE :- This is not the end of Docker. There is a lot more to discover and read on this topic. This was just a basic intro of Docker so that beginners can understand about it :)
My other publications :-
- “Ultimate guide or brief of AWS(Amazon Web Services)” https://firstname.lastname@example.org/aws-amazon-web-services-41fc7e59fc27
- “Microsoft Learn Student Ambassador.” https://email@example.com/microsoft-learn-student-ambassador-63298dc85e86