Dockerfile 代码如下:
FROM php:5.6-apache
RUN echo "deb http://archive.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list &&
echo "deb http://archive.debian.org/debian-security stretch/updates main contrib non-free" >> /etc/apt/sources.list
RUN apt-get update &&
apt-get install -y --allow-unauthenticated
libpng-dev
libjpeg-dev
libfreetype6-dev
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
&& docker-php-ext-install -j$(nproc) gd mysqli
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*