thibaud-rohmer / PhotoShow

A free web gallery in PHP with drag-n-drop support
http://www.photoshow-gallery.com
502 stars 151 forks source link

Use docker-compose instead of dockerfile #356

Closed andiges closed 6 years ago

andiges commented 6 years ago

What about to use docker-compose instead of Dockerfile to combine existing images like nginx and php @cyosp ? I can write docker-compose.yml, but want first discuss whether it is useful or not.

cyosp commented 6 years ago

Hi @andiges,

I've never used docker-compose.

As you say, it allows to combine several images instead of install each components of them and it can be done easily using docker-compose.yml configuration file. It avoids to invent again the wheel nevertheless it has the constraint to select appropriate images in terms of installed and configured components.

Once images have been combined it's necessary to add our specific configuration. It seems the way to achieve this is to use a Dockerfile referenced in docker-compose.yml. In what have been done for Photoshow I'm not sure to see advantages to use docker-compose here.

At the end, I think the best way to have a response is to start to create a docker-compose.yml configuration file and try to use it.

Best regards, CYOSP

cyosp commented 6 years ago

Hi @andiges,

I've tried docker-compose. It's useful when you need to use images already existing with only configuration to add to them. For example : combine Nginx and PHP-fpm images to run a simple PHP website whose source code is shared on host machine.

Share code on host machine is not what we would like with a PhotoShow image because we want it included in the image.

Furthermore docker-compose doesn't allow to enrich existing images. Thus PHP-fpm image cannot be used here because php-gd is not part of image.

At the end, docker-compose is not the right tool for PhotoShow to provide a ready to use image.

Best regards, CYOSP

andiges commented 6 years ago

Hi @cyosp,

Furthermore docker-compose doesn't allow to enrich existing images. Thus PHP-fpm image cannot be used here because php-gd is not part of image. You can use dockerfiles in docker-compose.yml to change/build the images.

At the end, docker-compose is not the right tool for PhotoShow to provide a ready to use image. Ok.

Thanks