You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM php:7.2-fpm-alpine3.7
RUN apk add --update php7-gd
...
However when running this, it complained it couldn't find the php-gd extension. I then instead changed the dockerfile to:
FROM alpine:3.7
RUN apk add --update --no-cache php7 php7-gd
Which then worked. So I'm guessing it's do with the way php is built. None the less I find this behavior a bit intuitive. What is the purpose on basing the image on alpine in this case?
The text was updated successfully, but these errors were encountered:
When you install php* packages via apk, you're installing Alpine's PHP package (and thus if you're FROM php:xxx, you've got two copies of PHP included in the image). This image provides PHP in the way that PHP upstream recommends and supports, which is downloaded and built from source. If you want to continue using this PHP image, you'll need to download and compile modules like gd from source as well. For modules which are built-in (like gd), you can use the helper scripts we provide to do so (docker-php-ext-install, etc).
I had the following dockerfile:
However when running this, it complained it couldn't find the php-gd extension. I then instead changed the dockerfile to:
Which then worked. So I'm guessing it's do with the way php is built. None the less I find this behavior a bit intuitive. What is the purpose on basing the image on alpine in this case?
The text was updated successfully, but these errors were encountered: