agentejo / cockpit-docker

MIT License
19 stars 16 forks source link

GD seems to be broken #14

Open eXaminator opened 4 years ago

eXaminator commented 4 years ago

In #10 it was said that gd needs to be configured differently. But gd isn't working for me, neither with the 0.10.0 image nor with the latest image.

When cockpit tries to create thumbnails I get the following error:

Call to undefined function claviska\imagecreatefromjpeg()

After going into the container via docker exec I was able to execute the following commands without errors:

docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
docker-php-ext-install -j$(nproc) iconv gd pdo zip opcache pdo_sqlite

Here is how the problem can be reproduced easily:

docker pull agentejo/cockpit:latest
docker run --rm -d --name cockpit agentejo/cockpit:latest
docker exec -it cockpit /bin/bash

docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
# => configure: WARNING: unrecognized options: --with-freetype, --with-jpeg

docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
# => works without error
ibnumalik commented 4 years ago

When building image with this line it fails:

docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

I need to update this line to make it work again.

docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/

I don't know why we revert the fix in this commit #12