Sometimes, we need a lot of dependencies and libraries to build a software and sometimes we need different version of same library and dependency. It is easier to install these dependencies when the list is small, but this list can grow out of hand very quickly and we need to install a lot of dependencies just for that 10 line of important code. And sometimes these dependencies conflicts with other systems or libraries.
In these scenarios, it makes sense to use a completely different environment that we can setup with required dependencies, build the code and tear down the environment after we are done with the build. Docker is a great tool and it fits perfectly for these kind of scenarios. Let us see how we can use a simple docker commands to build our software without bloating development environment.