andig / carddav2fb

Download CardDAV VCards and upload as phonebook to AVM FRITZ!Box
63 stars 19 forks source link

Sync Error - Docker image/Dockerfile - missing php component #211

Closed GUNT0815 closed 4 years ago

GUNT0815 commented 4 years ago

I am using the actual andig docker image from docker hub vor the sync of my adressbook between Ubuntu/nextcloud 19 on docker and fritzbox 6490 v7.12. Phonenumbers are synced. But the following error message occurs in general and fonpix are not synced:

----------------------- log output start Detaching and uploading image(s)

PHP Fatal error: Uncaught Error: Call to undefined function Andig\imagecreatefromstring() in /srv/src/functions.php:132

Stack trace:

0 /srv/src/functions.php(187): Andig\convertPNGtoJPG('\x89PNG\r\n\x1A\n\x00\x00\x00\rIHD...')

1 /srv/src/functions.php(255): Andig\getJPEGimage(Object(Sabre\VObject\Component\VCard))

2 /srv/src/RunCommand.php(71): Andig\uploadImages(Array, Array, Array, Object(Closure))

3 /srv/vendor/symfony/console/Command/Command.php(258): Andig\RunCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

4 /srv/vendor/symfony/console/Application.php(911): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

5 /srv/vendor/symfony/console/Application.php(264): Symfony\Component\Console\Application->doRunCommand(Object(Andig\RunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) in /srv/src/functions.php on line 132

---------- log end

andig commented 4 years ago

It looks as if the function is missing from the PHP distribution used in the docker image:

❯ docker run -it --entrypoint /bin/sh andig/carddav2fb  
/ # php -r "imagecreatefromstring();"
PHP Fatal error:  Uncaught Error: Call to undefined function imagecreatefromstring() in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
GUNT0815 commented 4 years ago

Can I fix this myself (I have no clue how, I am on rookie level) or will you be so kind and fix this in the Dockerfile/Image on docker hub?

GUNT0815 commented 4 years ago

Tested with my installation -> work now perfect! Thanks.