What better approach in docker than containers like apache, nginx, mariadb, etc.

2

I'm new to the docker world and I have some doubts about the docker concept in production.

I know that one of the great advantages of docker is to have the same environment that we have in development in production so as to avoid those classic problems that are running on my machine, but not on the server.

So I see in this case that when I create my application I can configure a docker-compose.yml with the necessary images for my environment. Like for example apache, php5.6, mariadb and do a docker-compose up to have the necessary environment. And likewise when another person from my team picks up the project will only do a docker-compose up and will have everything needed also without having to install and configure anything on his machine.

Then if I wanted to send this to the production, I would do the same thing, right? And if another project already uses php7 and postgresql then in docker-compose.yml I will put php7 instead of 6 and postgresql instead of mariadb

So now is my question.

I've set up a docker cluster and I've seen the approach is to create services for the images. A pro apache service, a pro mariadb, a postgre pro and so on.

So in this case how do I get the configuration of my docker-compose.yml? And will I have to previously create services for every thing a new application will need? Does not this escape the ease of the environment? Even because an application may need a certain detail in an image that another does not need.

Like I said, I'm new to the Docker world. I would advice you to avoid setting up an environment in the wrong way and having to change everything in the future.

Thanks in advance for the help.

    
asked by anonymous 13.01.2018 / 20:18

0 answers