Introduction to Docker technology


This entry is part 1 of 4 in the series Instructions for installing and using the Docker

SystemMen - 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?

introduction-to-docker-technology-01 Introduction to Docker technology
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.

introduction-to-docker-technology-02 Introduction to Docker technology
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.

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.

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.

Continue reading the seriesNext part: How to install Docker on Linux Mint 18 »»


«« »»
2 Comments