Skip to content

Instantly share code, notes, and snippets.

@jpswade
Last active September 9, 2023 20:43
Show Gist options
  • Save jpswade/4592d98e3596da59b7408c076e1c34db to your computer and use it in GitHub Desktop.
Save jpswade/4592d98e3596da59b7408c076e1c34db to your computer and use it in GitHub Desktop.
PHP 7.4 PHP-FPM Alpine with core extensions gd
FROM php:7.4-fpm-alpine
# @see https://hub.docker.com/r/jpswade/php7.4-fpm-alpine
MAINTAINER Agent Software <dev@agentsoftware.net>
# Install gd, iconv, mbstring, mysql, soap, sockets, zip, and zlib extensions
# see example at https://hub.docker.com/_/php/
RUN apk add --update \
$PHPIZE_DEPS \
freetype-dev \
git \
libjpeg-turbo-dev \
libpng-dev \
libxml2-dev \
libzip-dev \
openssh-client \
php7-json \
php7-openssl \
php7-pdo \
php7-pdo_mysql \
php7-session \
php7-simplexml \
php7-tokenizer \
php7-xml \
imagemagick \
imagemagick-libs \
imagemagick-dev \
php7-imagick \
php7-pcntl \
php7-zip \
sqlite \
&& docker-php-ext-install iconv soap sockets exif bcmath pdo_mysql pcntl \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-install gd \
&& docker-php-ext-install zip
RUN printf "\n" | pecl install \
imagick && \
docker-php-ext-enable --ini-name 20-imagick.ini imagick
RUN printf "\n" | pecl install \
pcov && \
docker-php-ext-enable pcov
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/bin/composer
#EOF
@waflessnet
Copy link

hi thanks ,
but not work D;
ERROR: unable to select packages:
php7-imagick (no such package):
required by: world[php7-imagick]
php7-json (no such package):
required by: world[php7-json]
php7-openssl (no such package):
required by: world[php7-openssl]
php7-pcntl (no such package):
required by: world[php7-pcntl]
php7-pdo (no such package):
required by: world[php7-pdo]
php7-pdo_mysql (no such package):
required by: world[php7-pdo_mysql]
php7-session (no such package):
required by: world[php7-session]
php7-simplexml (no such package):
required by: world[php7-simplexml]
php7-tokenizer (no such package):
required by: world[php7-tokenizer]
php7-xml (no such package):
required by: world[php7-xml]
php7-zip (no such package):
required by: world[php7-zip]

@waflessnet
Copy link

ok no.
the problem is version docker docker-library/php#1130 (comment) | work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment