【发布时间】:2021-09-20 14:29:09
【问题描述】:
我正在尝试使用 docker-compose up -d 启动 docker 容器,但我收到错误 configure: error: jpeglib.h not found
这是 dockerfile 的样子:
FROM php:7.2.18-apache
[..]
RUN apt-get update -qq && apt-get install -y -qq \
libicu-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libcurl4-openssl-dev \
libzip-dev \
software-properties-common \
libcurl3 curl \
git \
zip \
unzip \
inotify-tools \
build-essential \
libxml2-dev libxslt1-dev zlib1g-dev \
git \
mysql-client \
sshpass \
gnupg \
nano \
sudo \
vim \
graphviz \
netcat-openbsd \
ant \
[...]
RUN docker-php-ext-install iconv mbstring opcache
RUN docker-php-ext-configure gd --with-freestyle-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install gd
我已经尝试了几种方法,例如使用 --with-freestyle --with-jpeg 而不是 --with-freestyle-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 导致 configure: error: png.h not found。
我还用docker-php-ext-install -j$(nproc) 尝试过,但也没有用。
有人知道可以做些什么吗?
谢谢
【问题讨论】:
标签: php docker docker-compose dockerfile gd