-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
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:
- Is there a reason these awkward paths are chosen?
- 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?