Why do you need Docker?

In modern times, the demand for software development is becoming more and more extensive. Previously, we developed monolithic applications and worked only with a specific part of the software. Nowadays, the development of microservice-type software is quite popular, and this type of architecture requires the programmer to have knowledge of a wider range of aspects in addition to classic knowledge and to work with various software products that are updated all the time.

If we look at the issue as a .NET programmer, previously Visual Studio, SQL Server Management Studio (SQL Server), HTML5/CSS3, and React/Angular, which are classic tools used in the development of some software, are currently used in addition to MSMQ, Redis, Message Bus, Azure /Knowledge of tools and technologies such as AWS, Docker, Kubernetes, etc. is also required. To be more realistic, I am writing exactly what is required in the job offer I received: "The project is to develop a digital banking app. Stack: C#, .NET Framework, .NET Core, SQL, microservices, Docker, K8s, RabbitMQ, ActiveMQ, CI/CD, Cloud skills “.

When installing some programs, it should be taken into account that these programs may have dependencies on other libraries, frameworks, etc. We have encountered similar problems while installing some programs that we use in our daily life. Some programs depend on Java and some on some version of the .NET framework etc.

why you need Docker

The more technologies and tools we work with, the more time it takes to configure and prepare the working environment.

As a programmer, our main task is not to configure some software, tool, and technology, but to translate the customer's business requirements into software. Of course, the tools we will use will not be installed and configured by someone else. We still have to do it ourselves.

However, for programmers not to waste their time on such processes, and to be able to quickly prepare a ready-made working environment, tools and technologies that automate and facilitate this work are used in most cases. One of those tools and the most famous one is Docker.

Every programmer must have encountered a problem at least once in his life when installing a program that he started using. At this time, if we easily understand the problem, we solve it ourselves, or we try to solve it by turning to the Internet. Approximately, the solution to the problem goes through such stages.

why you need Docker

To avoid such similar problems/issues, we use Docker. What Docker wants to solve is the secondary problem of "installing the necessary applications" and making them available.

Our Docker articles will be explained using the Docker Desktop software installed on the Windows operating system. You can download the Docker Desktop by visiting its official website.

Let's explain what we said above about Docker with a short example. Let's imagine that we need an MSSQL server for development. Since this software is only needed for this project, we don't want to install it completely on our computer. We want to automatically delete the project via docker when we finished working with it. Let's take the following steps to load the MSSQL server through docker:

1. After Docker Desktop is installed, open the command line by pressing the Win+R key and typing cmd in the Windows operating system.

2. In the window that opens, type the command

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Admin@123" -e "MSSQL_PID=Express" -p 1433:1432 -d mcr.microsoft.com/mssql/server:2019- latest

Thats it. SQL Server is now installed on our “computer” via docker.

why you need Docker

3. Then connect to the server 

docker exec -it 33fc0c950d31783b7ec550fd2b303badc187544814dd61830cf319334c86c6ac /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Admin@123

why you need Docker

In the end, you need to understand that, we use docker to speed up our development process, isolate application installing processes and create and run containers and images.

In our next articles, we will dive into details of Docker internals with image and container creation.


Similar Articles