matriphe / docker-alpine-php

PHP FPM and PHP CLI docker image based on Alpine Linux
45 stars 29 forks source link

PHP7: Included php-cli, opcache, xdebug and composer. #6

Closed macmladen closed 8 years ago

macmladen commented 8 years ago

I think that php-cli should not be separated. It does not save too much of a image size and yet prevents usage of command line php which is important for Drupal, Symfony and other Composer based projects.

matriphe commented 8 years ago

the first time I build the image, the idea was separating the process, one process to one container. if people only need to make a "cli" version of php, they can grab that one.

but since that case is very rare, i think the idea of merging cli is make sense. i think it should go to different branch, so we can tag it using fpm-cli or something.

will review this PR soon. thanks for the contribution!

Muhammad Zamroni Sent with Airmail

On 22 Agustus 2016 at 02.02.03, Mladen Đurić (notifications@github.com) wrote:

I think that php-cli should not be separated. It does not save too much of a image size and yet prevents usage of command line php which is important for Drupal, Symfony and other Composer https://getcomposer.org/ based

projects.

You can view, comment on, or merge this pull request online at:

https://github.com/matriphe/docker-alpine-php/pull/6 Commit Summary

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matriphe/docker-alpine-php/pull/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ7DoMB_ZaWTkuktJrnqnyT0iRYo1itks5qiKCrgaJpZM4JpXMD .

macmladen commented 8 years ago

Here is new revision (not sure if we should comment here or on issues but here seems more natural).

Most important, build size is exactly the same while structure is more readable and manageable.

Changes:

  1. Separated sections for easier understanding, maintenance and customization
  2. After apk update it is not necessary to use apk --update in following apk-s, repositories are already updated in first one.
  3. Not sure if something is missing or something is not needed in PHP7 essentials so I just left it as it is, I tried to look at major PHP projects but it seemed OK (Symfony for example looks covered).
  4. I am not too sure that all database connectors are needed so maybe some less frequent (like odbc) could be commented out. It is questionable how much is saved (not much, really).
  5. Section with FPMmodules is separated so it could be explained how those could be deleted for custom build without it.
  6. Also CLI is separated as a section and can be removed or not for custom build.
  7. composer is installed by php with official script, not added by dockerfile which removed unnecessary layer.