Understanding Docker
Published 6 years and 2 weeks ago, Categorized under: Code, Linux, MySQL, Nginx, PHP

Just to be clear, am not an expert nor I use docker in my production or development environment.
Since the day I read about docker I found the idea interesting and it has a future, I kept my eyes on the process and how it evolve, I even started to spread the idea between my friends who works as sysadmin.

For the last few months I started to read more about it, but still couldn't find a full resources about how to fully use it within my workflow, and at the end am just a developer who is interested in docker, thats all.

But I have noticed that not all people understand docker very well, some of them has taken docker to the extremes, others just using it as a layer upon his own development/production environment.

for example if I want to create NMP (nginx, mysql and PHP) stack for laravel I can find two types of images:

1- With the full stack on it: which is just a layer upon the OS and I found it useless.

my Idea, if you want to use docker like that, then you are doing it wrong, you dont need a layer with everything on it over your VPS/Server, you can use Puppet or Ansible for this.

2- Create a docker image for each and every part:

  • nginx image
  • mysql image
  • php-fpm image
  • laravel image
  • composer image

Also this is not right to, from my point of view,  you are just make your environment complicated with no gain at all.

for example :

Laravel : should not be an image, at the end its just a pure file system which is not service, nor a software, its just a framework, which you can build you apps/web project using it.

Composer : also should not be an image alone, it can be installed with either php-fpm or on the system, at the end it will not work without php, and using it alone in its own image make no sense ( at least for me ).

so yes, you should cut those images to just 3 images: nginx, mysql and php-fpm, cause you might need to change the version of that software and you need a simple  way to change that without affecting on your service/product live cycle.

So If you think am missing something, or I should search more, or if you have a nice idea/opinion which you think will make me understand docker more, let me hear you, at the end we are all need to learn something new each day or at least correct our information.

PS: My English might not be as good as yours because after all its not my native language.

Share It via: