Why you should learn Docker now as a Software Engineer in Nigeria

image credit: google.com

We Nigerian programmers are often all about shared hosting, cpanel, php and are ignorant of the trending tool sets used to build truly scale-able apps across the world. Some of these tools include Redis, PAAS services, IAAS services, kubernetes, and of course; docker.

In a series of articles including this one, I intend to address these technologies in language as basic as possible one after the other – not just as a tutorial on how to use them; but to impart the importance of learning and using them as Nigerian developers.

What is Docker?

To understand docker, one must first learn the circumstances that necessitated its invention. 

When software programming was a nascent phenomenon, it was normal to see single programmers building apps. As software demands and standards grew, it quickly became impossible to develop any serious software except as a member of a team. 

During team collaborations, programmers realized that they spent an unhealthy amount of time  fixing errors that arose because different developers were using different computers and software present on this person’s computer is not installed on another. And even when the software existed  on both, they might have had different versions. There arose the need to solve this problem. The first solution was virtual machines.

Virtual machines are in the simplest definition, operating systems running on another operating system. For instance, you can use linux on a windows machine with the help of oracle vm ware, you can also run windows on linux with the help of wine. 

Virtual machines solved the problem to an extent since all the team members now had to do was setup one virtual machine image, then copy it amongst themselves. This ensured that the development environment was identical for all developers working on one project.  The only problem was: VIRTUAL MACHINES TAKE UP A LOT OF SPACE AND TAKE EVEN MORE TIME TO RUN…

Then docker arrived to save the day. Instead of simulating an entire operating system like virtual machines do, docker simulates a user instance on the host operating system. This user instance has its own installed applications, configurations, etc. 

To understand this; imagine your windows system. It has the ability to have more than one user account (Remember?). If you have different user accounts, you might realize that the apps installed on one account are not present on the other user account. That is what the guys that invented docker took advantage of; packaging an entire user account complete with its own software, files, folders, and capable of running software other user accounts on the same computer cannot see or run. They then scratched their heads and called it a ‘container’. They are smart right? I thought so too.

Docker was so much better because its order of magnitudes lighter in size, and starts up in milliseconds. Docker allows a development team to share the same environment by simply using a command as simple as 

“Docker pull larisoft:development_server”. 

If apache is installed on the docker image above (development_server), but is missing on the host computer, the application will still run. There are ‘buts’. But you can assume for now that once you download the image and run it, you are working from it, as opposed to your own operating system. You can install apps to the image, and you will see its not even installed on your own operating system.

That’s the surface idea behind docker.

Now, why should Emeka, Musa, and Kola learn docker? Is it not just another tech fad that will fade?

Docker is essential when working in teams:

 It is  in the same league with version control systems (git and co).  It will save you the time you spend configuring php mysql etc on your computer, and then  configuring it for your friend again. With docker, you can configure it once, and your friend just copies it and everything works fine – so to say.

If you do not learn Docker, you will not be able to understand, much less, contribute to a lot of open source projects

A lot of web based open source projects are packaged in docker containers. Is it little wonder that there is usually little contribution from we Nigerians to them? 

Docker will save your company money:

Not only can docker containerize all your application’s dependencies; it also lets  you host multiple applications on the same server. I recently had a situation where Amazon was overbilling me because i had different servers setup for dev and production. Guess what? Docker cut my costs in two! Even Google reportedly closed an entire data farm after they started using docker.

Knowledge of docker is crucial to land good jobs

Foreign remote jobs are not like what we have here in Africa where one person is paid to  design the app logo with photoshop, design the architecture on paper, code the entire app with little or no documentation, and setup it up on the server – all by himself. Foreign projects are structured and thoroughly divided across specialty lines. The person implementing  the frontend is not even the person doing the UX. All team members usually require the same environment for testing though. Thus, you will often be asked questions about docker in any serious developer interview.

With docker, you can actually sell services that would have been otherwise impossible.

Imagine you have written an app in php, mysql and co. How do you sell it to a client who wants to host it on his local computer but cant configure the  LAMP stack necessary to run it? Before now, you might have had to travel all the way to his location. This is not scalable at all. But with docker you can simply send them a docker container after you have received payment.

Docker is not going anywhere soon:

All the huge companies including Amazon, google, fb, heroku, already rely on and are  invested heavily on docker. This is a skill that when added to your portfolio will pull in cash for a long time before it gets rusty.

In conclusion, you really should learn docker. A tutorial on that might come from me soon but in the event that it does not, please google it and start learning!

In subsequent articles, I shall address Redis, IAAS, PAAS, Kubernates.