Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.9K
Visualizações
Unable to enable GD with JPEG support in PHP8 container running in Docker

Tried many ways, but still unable to get GD enabled with JPEG support in PHP8 container running in Docker. Here's the fragment of my Docker file:

FROM php:8.0.10-apache

RUN apt-get -y update && apt-get -y install \
apt-utils \
vim \
rsync \
curl \
openssl \
openssh-server \
mariadb-client \
git \
zlib1g-dev \
libicu-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libzip-dev \
libpng-dev \
g++ \
zip \
unzip \
gnupg \
gnupg2 \
unixodbc-dev

RUN docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd 

JPEG Support is missing

As you see the JPEG Support is missing. What am I missing here? Thanks!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I'm using Nginx (not Apache like you) but ran into a similar issue with GD. I got GD running with jpg, png and webp by using the following lines:

FROM php:8.0-fpm-alpine

# Install dependencies for GD and install GD with support for jpeg, png webp and freetype
# Info about installing GD in PHP https://www.php.net/manual/en/image.installation.php
RUN apk add --no-cache \
        libjpeg-turbo-dev \
        libpng-dev \
        libwebp-dev \
        freetype-dev

# As of PHP 7.4 we don't need to add --with-png
RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype
RUN docker-php-ext-install gd

Looking at your RUN apt-get statement, I noticed that you are using another libjpeg library: libjpeg62-turbo-dev \. Could you check if that is the correct version? And/or try to change the name to libjpeg-turbo-dev \ (without the 62 in the name).

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda