Skip to content

PHP 7.4 GD installed in dockerfile yet php reporting that imagecreatetruecolor is undefined #1297

@glenelkinsdev

Description

@glenelkinsdev

I'm having a nightmare with the php 7.4 docker image and GD, i have installed GD with the best of my knowledge yet when i try to use imagecreatetruecolor it's an undefined function.

Here is my dockerfile (the part of it that's relevant anyway):

FROM php:7.4-fpm

RUN apt update

RUN apt-get install -y libzip-dev zip curl libpng-dev libonig-dev libjpeg-dev libfreetype6-dev
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install -j$(nproc) mysqli pdo pdo_mysql zip gd mbstring exif iconv

RUN docker-php-ext-enable pdo_mysql zip gd

I'm not sure what else i'm supposed to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions