Utilizing Docker to Aid Development
Sep 24, 2021by, Nihal Usman Faisal
Why should developers use Docker for their projects?
Often when working on a new project or on an existing project developers spend a lot of time in the early stages setting up an environment for development. This involves configuring the environment variables, ensuring the correct versions of the packages, resolving dependencies, and installing other dependent services like databases. Docker although primarily used for deployment, also provides some benefits when used for the development
Often when setting up a project environment on a local machine it is often a situation of “it works on my system” where the setup process might not be the same across multiple systems. Docker simplifies the entire setup process to just building the docker image and running the docker container.
Convenience Of Docker Compose
A project often requires multiple dependencies to be fully operational such as multiple databases, message queues, and so on. So whenever a project needs to be run these dependencies and services have to be manually started. Docker-compose is a solution to this very problem. These dependencies/services can be configured as Docker containers that startup when the project is run. So starting up the project is as simple as running the docker-compose file.
Docker is completely independent of the OS of the system. So a docker container can be run on Windows, Mac, and Linux systems without any sort of modification
Standardization of Environment
The use of docker ensures that the development environment is identical across the machines of all developers. This ensures version control on the packages and helps avoid any bugs or conflicts that arise due to different versions as the environment is standardized.
Deployment Becomes Easier
The use of docker images and containers makes the process deployment much easier. Due to the use of docker, the environment in production will be similar to the development environment which has been thoroughly tested. So it is much more unlikely for any issues to pop during the deployment phase in regards to the project environment.
Isolation Of Processes
The isolated nature of the docker containers allows developers to be able to run different versions of packages without any issues and without having to install them manually. This helps free up clutter from the developer’s system.
Have a project in mind that includes complex tech? Contact us here.
Disclaimer: The opinions expressed in this article are those of the author(s) and do not necessarily reflect the positions of Dexlock.