It requires the zlib system package, a workaround is to add this to your Dockerfile
RUN apt-get update && \
apt-get install -y \
zlib1g-dev
See docs forthcoming: https://github.com/docker-library/docs/pull/130
Fixed via documentation in docker-library/docs#130.
If it helps anyone using the Alpine image, I succeeded with zlib-dev.
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --fix-missing \
apt-utils \
gnupg
RUN echo "deb http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list
RUN echo "deb-src http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list
RUN curl -sS --insecure https://www.dotdeb.org/dotdeb.gpg | apt-key add -
RUN apt-get update && apt-get install -y \
zlib1g-dev \
libzip-dev
RUN docker-php-ext-install zip
If it helps anyone using the Alpine image, I succeeded with
zlib-dev.
In Alpine I have to install libzip-dev too: apk add libzip-dev
Did anyone get this working?
FROM php:7.4-fpm-alpine
WORKDIR /var/www/html
RUN docker-php-ext-install pdo pdo_mysql zip
I get the zlib needed error. I added the code above but it says apk-get is not found.
EDIT:
this worked:
RUN apk add --no-cache zip libzip-dev
RUN docker-php-ext-configure zip
RUN docker-php-ext-install zip
RUN docker-php-ext-install pdo pdo_mysql
Most helpful comment
If it helps anyone using the Alpine image, I succeeded with
zlib-dev.