Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

306
Vistas
GD library for Docker image with php:7.1-fpm

I have a Docker container

FROM php:7.1-fpm

RUN apt-get update \
    && apt-get install -y \
    && docker-php-ext-install mysqli pdo_mysql

WORKDIR /var/www

CMD ["php-fpm"]

COPY nginx/www /var/www
COPY php/php /usr/local/etc/php

I tried to add some various code for installing GD library but all they didn't work.

I tried to add this

# GD LIB
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install -j$(nproc) iconv mcrypt zip pdo gd bcmath

I want to add GD library for PHP. Help me, please.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

FROM php:7.1-fpm

RUN apt-get update \
    && apt-get install -y \
    && docker-php-ext-install mysqli pdo_mysql

WORKDIR /var/www

RUN apt-get update && apt-get install -y libpng-dev
RUN apt-get install -y \
    libwebp-dev \
    libjpeg62-turbo-dev \
    libpng-dev libxpm-dev \
    libfreetype6-dev

RUN docker-php-ext-configure gd \
    --with-gd \
    --with-webp-dir \
    --with-jpeg-dir \
    --with-png-dir \
    --with-zlib-dir \
    --with-xpm-dir \
    --with-freetype-dir \
    --enable-gd-native-ttf

RUN docker-php-ext-install gd

CMD ["php-fpm"]

Try this code this working after build image run container and check container logs. show below result.

[15-May-2019 11:46:34] NOTICE: fpm is running, pid 1
[15-May-2019 11:46:34] NOTICE: ready to handle connections

Also, add nginx installation code.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda