Introduction to Docker technology

by Daniel Pham
Published: Updated:
This entry is part 1 of 4 in the series Instructions for installing and using the Docker

Recently, you’ve heard a lot about docker. So what is docker? What does it do and why should we use it?

Before we find out what it is, let’s see this one first.

What is a container?

According to information from the docker home page, the container defines the following:

A 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.

With the above definition, you’re still wondering what the container does?

comparison between traditional virtual machines and containers
Comparison between traditional virtual machines and containers. Source: internet.

The software companies race on technology, software development lifecycle needs to be done continuously and quickly. So the container came into being.

Imagine that, every time you start writing a software, you need to install dependent packages to work, from os, web server, php version, mariadb, and so on.

The container left to solve the problem. You can pack all those things into one file. And later, you just need to run the file and you have the environment ready as you want.

What is Docker?

You already imagine that the container will help you have a software development environment quickly and not conflict with the rest of the server.

So how to get containers, how to create containers? How can we work with containers and manage containers?

Answering those questions is Docker. Read more on homepage.

overview of Docker and how Docker manages the containers
Overview of Docker, how Docker manages the containers. Source: internet.

Simply understood, Docker is a platform (both commercial and free) that provides services and tools, allowing you to package and run your programs on different environments as quickly as possible.

Simply imagine, Docker is the platform for you to work with containers.

Recommended Reading: How to install latest Nginx on Debian 8

Benefits of Docker

Simulate the server environment at the local machine

You program the software on the local machine very well, but when it is uploaded to the server, it is faulty. Why? Because the environment on both sides is not the same.

For example, your machine runs python 3.5 but the CentOS server runs python 2.7, so your code fails because of different versions.

Docker will help you simulate the server environment perfectly without changing anything on your local machine.

Store and share the project environment settings for the team

Each project can have many people, requiring environmental setting to be meticulously documented, so that everyone can understand.

With Docker, you only need to share the environment image file with the whole team, so make sure the environment is the same between the members.

Software testing at the same time

To test the software, many people and many machines are needed at times. If you use a single machine, it will take a long time.

Now you can create multiple identical containers from the same original image file. Each container will let it perform a test task.

Test software on other operating systems

Traditionally, you will have to create different virtual machines and install operating systems on it. This takes a lot of time and resources.

With Docker, you just need to create other containers like from different OS images. So you’ve got environments with different operating systems already, on the same local machine and even extremely fast.

Recommended Reading: Install LAMP (PHP 7) on Ubuntu 16

Avoid conflicts and reuse resources

With traditional virtual machine, if you install the dependencies fails, you may have to recreate the virtual machine.

Or if you have setup virtual machine environment to run PHP, now you want to setup virtual machine to be able to run Django simultaneously. This may conflict with the environment on the virtual machine.

Docker solves that problem easily. By creating different, independent environmental containers.

It will guarantee 2 things:

  1. First, the containers do not conflict or damage anything on the host machine.
  2. Second, the containers are independent, do not conflict with each other. The Django runtime environment will not affect the PHP runtime environment and vice versa.

Besides, the reuse of resources. Traditional virtual machine models are very resource intensive. With Docker and containers, you can create containers in minutes and it takes very little resources.

When you’re done using that container, you just need to use Docker to delete it. Host resources are quickly recovered.

Conclusion

Going through this article, you have a rough idea of what container is, what is docker? Why should we use docker. In the next article, I will show you how to use docker.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating
Series NavigationNext part: How to install Docker on Linux Mint 18 »»

You may also like

Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Rupesh Gore
Rupesh Gore
Guest
5 years ago

Thank you for this info about DOCKER…

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.