Skip to Content
Technical Articles

DOCKERS FOR ABSOLUTE BEGINNERS – PART 1

Quite recently, SAP has been into using more and more open source technologies. For example: Prominent solutions like SAP Data Intelligence takes advantage of these open source technologies like Kubernetes and Docker containers to a great extent. It is imperative for everyone to start understanding these technologies as going forward we will definitely see more of this.

I would like to thank my colleague Ujwal Iyer  for his contributions to this series of blogs (which we will be releasing subsequently) in enabling colleagues across the globe in understanding Kubernetes and Container technologies. We have written these blogs in such a way that anyone from any background could understand easily. And based on our experience we have tried to make it very simple without any complexity so that colleagues can get a basic understanding of what these technologies are used for and how it can be used and in what scenarios.

DOCKER CONTAINER INTRODUCTION

Dockers was essentially a need to come out of problem that we are going to discuss now.

Put yourself in to the shoes of a developer. Probably imagine you are trying to create a web application using HTML5, PHP etc., What would be the first step that we have to do now? We must write a code for the web application. Now, we need an environment to write the code. We will investigate the details about the environment as DOCKERS is all about the simplification of an environment 😊

 

For developers to create a web application, the following basic environment setup should be ready

  1. Dev would need an OS (Operating System)
  2. Dev would require a development language software like HTML5, PHP etc.,.
  3. Third Party Libraries. For example: if myPHP has to connect to database (For example: mySQL,SQL Server host etc., then it would need appropriate library like PHP My SQL Library to connect to the database.

This is the total environment that would be required by a developer to start developing his/her application

                                                                             Credits: PHP Image, Ubuntu Image, Library Image

Now as soon as the development is complete, the testing must take place. Now, the developer would give the web application file (for example: developed in PHP File) to the testing team for testing purpose.

Now, the first thing is that, the tester replicates the environment that the developer was using. Same OS, binaries, libraries etc., But now there are lot of versions within the software, OS, binaries etc., So the tester must exactly mimic environment of a developer to test the web application file or else environment inconsistency might lead to other issues and tester wouldn’t be able to proceed with the testing

                                                                      Credits: PHP Image, Ubuntu Image, Library Image

What is the common challenge that we have now? I’m sure everyone would have faced this.

If you investigate the scenario carefully, it was nobody’s fault. Everything is according to the plan. No fault from developer and no fault from tester. Then where is the problem? Why it did not work for the tester? The Answer is THE ENVIRONMENT SETUP is the BLACK SHEEP. Even though the Tester has setup everything right, there might be few mismatches in terms of libraries versions, or even a small upgrade the developer would have done but forgotten to inform the tester which would have caused an impact.

Why Don’t we use VM’s ? An easy Alternate option isn’t it ?

Developer can work on a VM, and give the same VM to the tester so that we solve the problem? This a viable solution right? What about the size of VM that we are going to give to the tester? Every developer should have a VM?. For testers, if they must test all the features of all the developers, then the testers might have ‘n’ number of VM’s which would be confusing and not a feasible solution.

CONTAINERS TO THE RESCUE

   

                                                                                                               Credits: pngall

 

So who is coming to the rescue? CONTAINERS to the rescue.

A container is an entity which can contain all the software

dependencies and can be ported on to other computers as plug

and play package. In this case, bundling an entire VM and giving

it to others is not at all possible. It is equivalent to giving out

our own machine to the testers and ask them “Hey, Please Take my entire machine and test it”.

                                                                  Credits: PHP Image, Ubuntu Image, Library Image

 

Container is like a wrapper which will basically contain all the required files for running the application successfully. And then deliver this wrapper to the testers. The testers don’t need to worry about the underneath platform, versions, binaries, software etc., everything will be there inside this container/wrapper. Now you understand why it is called as Containers? When we compare it with the Shipping container, how a shipping container can hold any item irrespective of size, weight, height etc., Our software container can hold all the software dependencies.

 

                                                                                     Credits: Gobertalli Blogspot

 

How our scenario looks currently with Containers in place?

CONCLUSION

Now we have covered the PART 1 – Looking back at what we learnt

  1. Disadvantages of traditional dev and testing approach
  2. Why we cannot use Virtual machines
  3. What is a container. Basics of container
  4. Scenario change representation with containers

In PART – 2

–  We will talk in detail about Docker Containers. Happy Learning !!!

3 Comments
You must be Logged on to comment or reply to a post.
  • Thank you for putting in such an effort to make things explaining in a simpler fashion. Will definitely keep a tab on this series.

    I think would be nice, if you kindly help with the forward blog posts link somewhere in this blog itself kind of a BlogChain!

  • Thank you for bringing this topic to more learners.

    I too have a series on Docker: https://blogs.sap.com/tag/understandcontainers/ and I believe the more different ways we have it presented and well explained — the better.