[Alpine Linux][Docker]PHP GDのインストール

LINEで送る
Pocket

RUN apk update && \
    apk upgrade && \
    apk add --update --no-cache \
    freetype-dev \
    libjpeg-turbo-dev \
    libpng-dev \
~省略~
RUN docker-php-ext-install pdo_mysql soap

RUN docker-php-ext-configure gd \
    --with-gd \
    --with-freetype-dir=/usr/include/ \
    --with-png-dir=/usr/include/ \
    --with-jpeg-dir=/usr/include/ && \
    NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
    docker-php-ext-install -j${NPROC} gd

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *