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

Extensions isnt compiled and added when using Dockerfile.7.3.slim.fpm #116

Closed
beejaz opened this issue Jan 27, 2019 · 2 comments
Closed

Comments

@beejaz
Copy link

beejaz commented Jan 27, 2019

Hi,

Ive been struggling with this for a while now, I cant understand what Iam doing wrong.

Im using Dockerfile.7.3.slim.fpm with this structure:
/php-slim/Dockerfile
/php-slim/extensions
/php-slim/utils

And ive added ARG PHP_EXTENSION at the top of the Dockerfile:
ARG PHP_EXTENSIONS="gettext apcu opcache pdo pdo_mysql zip soap intl"
ARG INSTALL_CRON=1
FROM php:7.3-fpm-stretch

None of the extensions gets compiled/installed when i build. If I add this manually below line 16:
RUN cd /usr/local/lib/thecodingmachine-php/extensions/current/gettext && ./install.sh
RUN cd /usr/local/lib/thecodingmachine-php/extensions/current/intl && ./install.sh

Those (two) extensions gets installed & compiled as intended. What am I doing wrong? Ive cleaned my cache, downloaded the image from scratch and gets same result each time. Using Dockerfile.7.3.fpm (fat) as Dockerfile works with the extensions.

@moufmouf
Copy link
Member

Hey @beejaz

I think you are not building from the thecodingmachine/php image :)

ARG PHP_EXTENSIONS="gettext apcu opcache pdo pdo_mysql zip soap intl"
FROM php:7.3-fpm-stretch

Your base image is the base php image instead of the thecodingmachine/php image.

Replace this with:

ARG PHP_EXTENSIONS="gettext apcu opcache pdo pdo_mysql zip soap intl"
FROM thecodingmachine/php:7.3-v2-slim-fpm

@beejaz
Copy link
Author

beejaz commented Jan 31, 2019

Hey @moufmouf

Thanks for the reply, I was thinking about that and looked at it. I was using https://github.com/thecodingmachine/docker-images-php/blob/v2/Dockerfile.7.3.slim.fpm and it says "FROM php:7.3-fpm-stretch" but all other was using FROM thecodingmachine/php:7.3-v2-fpm so I wasnt sure.

But now i know, thanks for the info! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants