Skip to content

Request: Alpine Version should use the native paths #380

@symball

Description

@symball

I'm referring to at least the Alpine PHP-FPM 5.6 version here

I've just switched over from the Debian version to the Alpine Linux and was having some trouble compiling the extensions but know there are already a set of packages available in the Alpine repository for the majority of extensions needed.
After trying to install them from there, my app was complaining about a lack of extensions and investigation shows that it was because PHP is expecting the following paths

config - /usr/local/etc/php
extensions - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/

Alpine Linux on the other hand installs to a much saner
config - /etc/php5
extensions - /usr/lib/php5/modules

What I have ended up doing with my dockerfile (because docker-php-ext-* rarely works) is just to remove the originals and symlink the Alpine paths using the following:

  RUN rm -R /usr/local/etc/php && \
    rm -R /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
  RUN mkdir -p /usr/local/lib/php/extensions
  RUN ln -s /etc/php5 /usr/local/etc/php && \
    ln -s /usr/lib/php5/modules /usr/local/lib/php/extensions/no-debug-non-zts-20131226

With the situation explained, I have 2 questions:

  1. Is there a reason these awkward paths are chosen?
  2. If not, can the paths in the image be set to what Alpine would natively use? It's installation method is much simpler than the aforementioned docker function

Is there a reason these particular directories were chosen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions