DEV Community

Discussion on: Fed up with theoretical Docker tutorials? 🙄 🐳

Collapse
 
jouo profile image
Jashua • Edited

Hey Nana, I was wondering if you could please help me with something

I just finished watching the 8th video of your series, I haven't skipped any video, the explanations are on point

I'm aware that these are the basics of Docker, but I still don't understand the point of Docker, its actual purpose, and that's been bugging me

I haven't worked for big companies, perhaps that's why I don't understand the benefits of Docker, do you have an article or something that might help me really understand the why of Docker?

Thank you :)

Thread Thread
 
techworld_with_nana profile image
TechWorld with Nana

Hi Jashua, sure I'd like to further help you understand why Docker. So here I also have an article about it: dev.to/techworld_with_nana/what-pr...

But if you want more specific answer, the question for you is, have you worked on an application with a team without Docker? And also do you have experience deploying applications and managing application versions?
Because then it will be easier for me to point out Docker benefits based on your specific example.

thanks :)

Thread Thread
 
jouo profile image
Jashua • Edited

Thank you for the article, now I understand how docker is implemented and what it should solve, the concept as a whole

I believe it's hard for me to truly understand its purpose because I personally haven't came across any of the problems that Docker tries to solve, reason being I have just worked on small applications with a small group of people

Do you have some sort of example like:
"We had this problem and Docker solved it by..."
"Docker allowed us to speed up development by..."

That might help me put myself in the shoes of people who have had those problems, as for your question:

As an example of our workflow, right now we are developing a small web application in PHP for a local business, we use Git for the versions, and the application will be deployed using AppServ (Apache) in a local server using Windows, some people develop in macOs, others in Windows or even in Linux

We haven't really came across compatibility problems, but now that I think about it... we haven't updated the software in fear of facing compatibility issues, since right now everything "just works"

Thread Thread
 
techworld_with_nana profile image
TechWorld with Nana

Sure, I understand your point completely. The setup with php, git and apache seems pretty simple to cause any real problems :)

To give you my example of a more complex application we were developing WITHOUT Docker:
It was a Java backend / JS frontend application with a web server and application server and a pretty complex relational DB setup.

The first problem was setting up the dev environment, especially when on-boarding a new developer.
So, In order to start developing, you first need to set up the dev environment. That means you need to get every part of the application running (backend, fronted, app server, web server and the DB) with correct versions and correct configuration. And the more moving parts in the setup, the higher the chance that something/s will go wrong.

Docker solution for this problem would be: run app server, web server and db all in their own Docker containers and instead of me creating/adjusting the configuration for each and figuring out which version combinations I should run etc, just get the docker-compose and do "docker-compose up". and that will do the job. And the reason why I don't need to care about configuration and setup myself with Docker containers is that it's all packaged in the image.

The second problem was deploying the packaged application. So every week, we would take the latest Release candidate built by Jenkins, we would download its artifact and test it on the local PC.

Now the backend and frontend were of course packaged together as a jar or war but the other parts still needed proper configuration and setup for this new version.
So download the jar/war artifact, put it in some folder with other configuration stuff, adjust the config file, adjust the server db setup bla bla. A lot of tedious work.

Docker solution: Jenkins will build the Docker image with the jar and all its needed config inside. Docker will also build the images of DB, servers with their updated configs. Again run the updated docker-compose and start the whole setup with 1 command.

A note here: all these config updates are made by the developer team ONCE and
not by each developer every time they want to deploy the application.

Hope these examples give you more specific idea about Docker use cases.

regards

Thread Thread
 
jouo profile image
Jashua • Edited

Thank you so much, best explanation I've ever read, I'm going to bookmark this! :D