Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reinstall the libzip distribution when build lumen in docker

I use docker version Version 17.12.0-ce-mac55 (23011) on osx version 10.11.6. I have a problem when I build lumen on docker, but when the build process is finished there is an error like this :

configure: error: Please reinstall the libzip distribution ERROR: Service 'app' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libpng-dev libjpeg-dev libpq-dev && rm -rf /var/lib/apt/lists/* && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr && docker-php-ext-install gd mbstring pdo pdo_mysql pdo_pgsql zip' returned a non-zero code: 1

This is my dockerfile settings: enter image description here

So the build process fails. Has anyone ever had a case like me? I hope someone can provide a solution.

like image 915
yusuf Avatar asked Dec 14 '18 02:12

yusuf


1 Answers

Try to configure zip with libzip and install libzip-dev

#install some base extensions
RUN apt-get install -y zip libzip-dev \
  && docker-php-ext-configure zip --with-libzip \
  && docker-php-ext-install zip

With Alpine version :

RUN apk add --no-cache libpng-dev zlib-dev libzip-dev \
&& docker-php-ext-configure zip --with-libzip \
&& docker-php-ext-install zip
like image 132
Maxime Maillet Avatar answered Nov 06 '22 11:11

Maxime Maillet