snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.52k stars 3.08k forks source link

ImageMagick module (and presumably gd) not pre-installed on snipe/snipe-it official Docker #14562

Open mattv8 opened 3 months ago

mattv8 commented 3 months ago

Debug mode

Describe the bug

Fresh docker image snipe/snipe-it not getting imagemagick (and presumably gd although I haven't explicity tested that).

Reproduction steps

  1. Fresh docker pull
  2. Specify IMAGE_LIB=imagick in my .env
  3. In Snipe-IT, I browse to Settings > Branding and attempt to upload logo PNG
  4. Click "save".
  5. Server will throw a 500 error.

Expected behavior

I would expect that the snipe/snipe-it Dockerfile would come pre-pachaged with Imagemagick or gd so it's ready to go out of the box.

Screenshots

Screenshot 2024-04-05 104840

Snipe-IT Version

v6.3.4 - build 13139

Operating System

snipe/snipe-it Docker image

Web Server

Apache2

PHP Version

PHP 8.1.2-1ubuntu2.14

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

Intervention\Image\Exception\NotSupportedException: ImageMagick module not available with this PHP installation.

Additional context

This is a fresh Docker pull of snipe/snipe-it.

I am able to fix the issue by SSH'ing into the docker image with docker exec -it {docker_image_name} /bin/bash and running the following commands:

apt update
apt install php-imagick -y
service apache2 restart

The issue with the above fix is that it will not persist between Docker pulls.

uberbrady commented 1 month ago

The whole point of docker is that it should be a runnable instance, with some choices made for you. One of those choices we made is to use 'gd' instead of imagick. Do you have a use-case for why you prefer imagemagick? Is it better or different in some way (I honestly don't know, they're interchangeable to the best of my understanding).