Use cases that motivate you to use Docker that you have never used

Introduction

When learning Docker, the pattern that you will study because you use it in a company project I want to use it because it is often used! I think it can be divided into two patterns (I was the latter)

When I studied, I didn't know how to use it, and there were various parts that I understood by using it in my work. We've summarized the use cases and benefits that we found useful. I hope that as many people as possible will want to read and use it.

Used for personal development

Create a linux development environment with Docker on your PC (Win or Mac)

merit
・ Development with a different language version from the mother ship PC can be carried out without switching packages.

Create a Linux environment with Docker and put language packages etc. in it to build a development environment. The essence is that you can package an environment that can be developed under the same conditions as a Docker image no matter where you connect. If you have an image, even if you purchase another PC, you can build the same environment immediately if you install Docker, If you set up a container on the cloud such as AWS, you can start development immediately just by connecting with SSH.

-Since it is actually developed in linux, there is no OS difference when deploying, and it is easy to publish from container creation.

It is almost similar to the above, but since it will be developed in linux, write the docker file as it is and create an image, You can publish the developed container immediately by uploading it to the cloud for containers such as ECR and GCR. Compared to deploying a product developed in your own environment on EC2 etc., there is less possibility of environmental differences and it is convenient.

Used in company projects

Use as a development environment

You can quickly create an environment for multiple people using a container

You can easily create multiple environments by simply changing the instance that pushes the Docker image. Since the development environment can be distributed, project-in can be done easily, and it is also possible to create an instance for testing. It is possible to respond flexibly. At startup, I often change various modules and try them out, so Make the parts that are not changed (main logic, etc.) into one Docker image, and make only the parts that are changed into another image. Work efficiency is improved by trying the environment with the description of docker-compose and immediately discarding unnecessary containers. (If you do the same thing locally, you will need to remove the package, eliminate errors, etc., which will require a huge amount of work.)

Used for production operation

Since scaling is easy, the best operation can be performed according to the scale of the service.

In social games, etc., if there is an event, access will increase and access at night will decrease. If the system cannot be scaled, there is a possibility that the server may go down due to waste of resources or excessive access. By using Docker, it is possible to scale out and scale in on a container-by-container basis. It can be operated while flexibly adapting the configuration according to the access.

Lubrication and speeding up of service operation

Since the work related to development (testing, deployment, scaling, etc.) becomes easier, you can concentrate on the product itself. It leads to reduction of overall time such as planning time to working time as well as technical aspect.

Things to worry about Docker

Development is possible without using it separately ・ Difficulty in joining a hiring company

In the first place, the operation method until Docker is used is not wrong, so considering the time to newly introduce it I think it is one option for companies to receive as many orders as possible and continue the same development. In the article in 2019, 9.2% of companies are using Docker containers in production in Japan , Participate in the relevant company There are some barriers to participating in the project.

High study cost from 0

If there are no experienced members, even if 7 members learn Docker in one day, it will take one man-hour per week. Research time is required for any new technology, but there is also the above-mentioned "development can proceed without using it". The hurdles for introduction will change depending on whether this time is considered "necessary" and how many people have Docke experience in the team.

Case studies / knowledge issues

In particular, I feel that the low adoption rate in the operation phase is largely due to the lack of knowledge. Recently, at AWS events, there was a presentation of a famous company Docker adoption case, I also find cases that I find useful in LT articles held by companies. The number of use cases that can be used as a reference when adopting them as a follow-up is increasing, and I think it is a very attractive option. Although convenient, it is not a silver bullet, so you need to consider whether it is more advantageous than other technologies.

Summary

merit

・ ** Minimize environmental differences ** and develop and operate with less stress ・ Because it can be used in all phases depending on how it is used, ** total time can be reduced ** ・ When interviewing a hiring company, it would be nice to be able to answer and answer about Docker operation.

Demerit

・ Some study time is required, so if you do not intend to continue using it, the benefits are small ** ・ It is up to the company to join the recruitment team or get approval for the introduction.

reference

Personal development

A story that made developing environment construction 10 times easier with Docker Develop in a container using Remote Containers of VS CodeI tried the Remote --Containers extension of VS Code

Operation / scaling related

[AWS] 7 things you need to know before Auto Scaling Amazon ECS & Docker operational knowledge to handle large-scale loads with Roma Saga RS Basic concept of scale-outWhy we use containers / Docker in 2018The future of containers as seen in Mastodon / Netflix Can containers become the mainstream of service development?

Recommended Posts

Use cases that motivate you to use Docker that you have never used
Docker image that can use cx_Oracle
[Python] I made a decorator that doesn't seem to have any use.
[Python] Use pandas to extract △△ that maximizes ○○
"Lie ... What have you been up to?"
How to use tensorflow under docker environment
Two document generation tools that you definitely want to use if you write python