DEV Community

Cover image for What is Docker?
Keshav Kumar
Keshav Kumar

Posted on

What is Docker?

What is docker? Before answering this question let me ask you if you have ever faced issues while installing new software on your computer and have spent several hours troubleshooting and setting environment variables for that. If you have, then here is the solution, DOCKER.
Now instead of going into the technicalities of docker, let me give you a real world analogy to help you understand it in a better way.
Container on Cargo ship
In the initial year of transportation everything was transported through the ships and there were some major problems like damaging of goods, slow process of loading and unloading from ships to trucks and vice-versa, missing of some goods and to overcome this problem first time containers were loaded on ship on April 26, 1956. This was a revolutionary technique because now the people just had to load all their respective containers and it was very easy and fast to load on ships and on trucks without missing any goods in the middle of transportation.
Container on Truck
This same technique was implemented in Docker, although docker provides many services but here we are mainly focusing on docker containers.

A docker container 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. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
These containers run in an isolated environment meaning one container process doesn’t interfere another.


Here is an example of dockerfile:
Dockerfile Screenshot

Top comments (1)

Collapse
 
andrewbaisden profile image
Andrew Baisden

I wish i learned Docker years ago im using it so often now and its great!