Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Composer's Docker image vs install Composer manually to PHP-FPM #6

Closed
bocharsky-bw opened this issue Dec 7, 2016 · 3 comments
Closed
Labels

Comments

@bocharsky-bw
Copy link

Could you explain a bit why Composer has its own Docker image? Is it best practice to use official Composer's Docker image instead of manually installing Composer to my custom php:fpm image? Any benefit? In this case, I need to share my PHP-FPM environment with the composer image in order to use Composer as a standalone container. is it a good idea to duplicate my php.ini config for PHP-FPM with Composer? I'd love to hear any thoughts about it.

I also think it would be nice to have the answer to these questions in the readme file of Composer's Docker image.

@alcohol
Copy link
Member

alcohol commented Dec 7, 2016

Composer does not need php-fpm, it only needs the cli binary.

I am not sure what to answer to your question. This image simply serves as a minimalistic docker container that can run composer (and nothing else).

In regards to, "what is best practice", it really depends on what you accept as the definition of "best practice". We are not here to tell you what the "best practice" is. We merely try to keep our image in line with general Docker best practices.

@bocharsky-bw
Copy link
Author

bocharsky-bw commented Dec 7, 2016

Ah, you probably misunderstand me a bit. Let me explain with a simple example.

I have an application which consists of a few containers: nginx:latest and php:fpm. So my question is should I prefer to add the standalone Composer container based on composer:latest in my Docker workflow or better to install Composer manually right to the php:fpm container since I already use it?

I think you could help with it because I believe you based on some good use cases when created Composer Docker image :)

@alcohol
Copy link
Member

alcohol commented Dec 7, 2016

Entirely up to you. The Composer image will likely not contain extra extensions you might need. Also it is based on PHP 7 and the Alpine distro. Whether or not this is an issue, depends on your use case. The readme on the docker hub mentions this caveat also and possible work-arounds. Worst case scenario, it does not fulfill your use-case, you can just copy the install instructions from our Dockerfile :-)

@alcohol alcohol closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants