Docker - PHP 8.0 with iconv

Viewed 746

i am learning with DOCKER and i want start php server with PHP 8.0 with ICONV.

I use this dockerfile.

FROM php:8.0-fpm-alpine

WORKDIR /var/www/html

# Setup GD extension
RUN apk add --no-cache \
      freetype \
      libjpeg-turbo \
      libpng \
      freetype-dev \
      libjpeg-turbo-dev \
      libpng-dev \
    && docker-php-ext-configure gd \
      --with-freetype=/usr/include/ \
      --with-jpeg=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd \
    && docker-php-ext-enable gd \
    && apk del --no-cache \
      freetype-dev \
      libjpeg-turbo-dev \
      libpng-dev \
    && rm -rf /tmp/*

RUN apk add libzip-dev

# Install intl extension
RUN apk add --no-cache \
    icu-dev \
    && docker-php-ext-install -j$(nproc) intl \
      iconv  \
    && docker-php-ext-enable intl \
    && rm -rf /tmp/*

# Install iconv extension
RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php

RUN docker-php-ext-install pdo pdo_mysql zip bcmath

Everythink is OK but iconv is disabled.

iconv
iconv support   enabled
iconv implementation    unknown
iconv library version   unknown
ICONV extension Disabled or does not work properly
ICONV extension is required and must work properly.

Please, can you tell me what is wrong? Thank you!

1 Answers

Old thread, but you are missing the iconv at the docker-php-ext-install

RUN docker-php-ext-install pdo pdo_mysql zip bcmath iconv
Related