Hi!
Thanks for the great job with the Docker image. I have it working but there is a slight issue. When I try to change my avatar I can only upload PNG-files. If I try a JPEG i get the following error
[2019-10-21 19:35:27] production.ERROR: Error: Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg() in /srv/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php:38
Stack trace:
#0 /srv/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php(339): Intervention\Image\Gd\Decoder->initFromPath('/srv/storage/tm...')
#1 /srv/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php(66): Intervention\Image\AbstractDecoder->init('/srv/storage/tm...')
#2 /srv/vendor/intervention/image/src/Intervention/Image/ImageManager.php(54): Intervention\Image\AbstractDriver->init('/srv/storage/tm...')
#3 /srv/vendor/flarum/core/src/User/Command/UploadAvatarHandler.php(98): Intervention\Image\ImageManager->make('/srv/storage/tm...')
#4 /srv/vendor/illuminate/bus/Dispatcher.php(90): Flarum\User\Command\UploadAvatarHandler->handle(Object(Flarum\User\Command\UploadAvatar))
#5 /srv/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Flarum\User\Command\UploadAvatar))
#6 /srv/vendor/illuminate/pipeline/Pipeline.php(104): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Flarum\User\Command\UploadAvatar))
#7 /srv/vendor/illuminate/bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#8 /srv/vendor/illuminate/bus/Dispatcher.php(76): Illuminate\Bus\Dispatcher->dispatchNow(Object(Flarum\User\Command\UploadAvatar))
#9 /srv/vendor/flarum/core/src/Api/Controller/UploadAvatarController.php(51): Illuminate\Bus\Dispatcher->dispatch(Object(Flarum\User\Command\UploadAvatar))
#10 /srv/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(98): Flarum\Api\Controller\UploadAvatarController->data(Object(Zend\Diactoros\ServerRequest), Object(Tobscure\JsonApi\Document))
#11 /srv/vendor/flarum/core/src/Http/RouteHandlerFactory.php(40): Flarum\Api\Controller\AbstractSerializeController->handle(Object(Zend\Diactoros\ServerRequest))
#12 /srv/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(67): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Zend\Diactoros\ServerRequest), Array)
#13 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\DispatchRoute->process(Object(Zend\Diactoros\ServerRequest), Object(Closure))
#14 /srv/vendor/flarum/core/src/Http/Middleware/SetLocale.php(52): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#15 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\SetLocale->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#16 /srv/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(33): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#17 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#18 /srv/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(57): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#19 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#20 /srv/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(34): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#21 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#22 /srv/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(53): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#23 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\RememberFromCookie->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#24 /srv/vendor/flarum/core/src/Http/Middleware/StartSession.php(63): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#25 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\StartSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#26 /srv/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(31): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#27 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#28 /srv/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(30): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#29 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\ParseJsonBody->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#30 /srv/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(59): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#31 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\HandleErrors->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#32 /srv/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#33 /srv/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#34 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\RequestHandler->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#35 /srv/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#36 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePathRouter->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#37 /srv/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#38 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\Stratigility\Middleware\OriginalMessages->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#39 /srv/vendor/middlewares/base-path/src/BasePath.php(53): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#40 /srv/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePath->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#41 /srv/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#42 /srv/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\EmptyPipelineHandler))
#43 /srv/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
#44 /srv/vendor/flarum/core/src/Http/Server.php(46): Zend\HttpHandlerRunner\RequestHandlerRunner->run()
#45 /srv/public/index.php(22): Flarum\Http\Server->listen()
#46 {main}
I have tried adding the following to my Dockerfile
(I left the line-numbers in to make it easier to find what I have changed.)
14 # Install dependencies
15 RUN apt-get update; \
16 apt-get install -y --no-install-recommends \
17 libfreetype6-dev \
18 libjpeg62-turbo-dev \
19 libpng-dev \
20 curl \
21 nginx; \
22 docker-php-ext-install \
23 mysqli \
24 gd \
25 opcache \
26 pdo_mysql;
But it doesn't solve the problem. Do you have any advice?