Docker
Docker
developers resistance towards it, the main reason I understand from my experience
is resistance to change, they are so habitual of their old development practices
that they turned blind to see the benefits the docker provides to developers. It is
true that Docker is a no silver bullet but to be honest it is not much less than
that too if you see its benefit that it provides to developers working in big
teams, cross prjects.
Time is Money
In modern software development practices, sticking to just one language for
software development is not sufficent. Say an example developing a medium size
website in php needs a whole bunch of libraries and extensions to be installed in
the system
Extract from one of the docker file, if not these have to do be done by developer
manually on system to provide all dependencies:
RUN apt-get update \
&& apt-get install -y ant \
&& apt-get install -y --reinstall base-files lsb-release lsb-base \
&& apt-get install -y nginx curl zip unzip git software-properties-common
supervisor sqlite3 wget \
&& add-apt-repository -y ppa:ondrej/php \
&& apt-get update \
&& apt-get install -y php7.2-fpm php7.2-cli php7.2-gd php7.2-mysql php-mcrypt \
php7.2-pgsql php7.2-imap php-redis php7.2-mbstring php7.2-xml php7.2-curl \
&& apt-get update \
&& wget http://packages.couchbase.com/releases/couchbase-release/couchbase-release-
1.0-4-amd64.deb \
&& dpkg -i couchbase-release-1.0-4-amd64.deb \
&& apt-get update \
&& apt-get install -y libcouchbase-dev build-essential php7.2-dev zlib1g-dev \
&& pecl install couchbase \
&& php -r "readfile('http://getcomposer.org/installer');" | php --
--install-dir=/usr/bin/ --filename=composer \
&& mkdir /run/php \
&& apt-get remove -y --purge software-properties-common \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& echo "daemon off;" >> /etc/nginx/nginx
Not just the php libraries, one needs diff environment like node, npm for frontend
development as well, figuring out all these dependecies with proper versions is a
challange, most oftenly one face challange due to conflicts that occurs in system
due to the presence of previously installed softwares and packages. Docker helps
and solves this problem by providing developers with the isolated new virtual
environment on seperate base image and a place to save and automate the
installation of required libraries in dockerfile. One who has ever struggled with
the installation of different librarries and extensions on system can easily
understand the time it saves to setup the system to start development and run
application.
This greatly reduces the time to onboard new developer into the team and getting
him ready for the contribution which solves actual business needs.