Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
interbase
intl
json
ldap
mbstring
mcrypt
mysqli
oci8
odbc
opcache
pcntl
pdo
pdo_dblib
pdo_firebird
pdo_mysql
pdo_oci
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
phar
posix
pspell
readline
recode
reflection
session
shmop
simplexml
snmp
soap
sockets
spl
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
@robsonvn

This comment has been minimized.

Copy link

@robsonvn robsonvn commented Nov 18, 2019

<3

@mostafabarmshory

This comment has been minimized.

Copy link

@mostafabarmshory mostafabarmshory commented Dec 23, 2019

<3

@asiby

This comment has been minimized.

Copy link

@asiby asiby commented Jan 20, 2020

Nice. Since some of them require custom installation steps, I will be adding those steps as I find them.

@asiby

This comment has been minimized.

Copy link

@asiby asiby commented Jan 20, 2020

Instaling php-gd

RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev \
    && docker-php-ext-configure gd \
    && docker-php-ext-install -j$(nproc) gd
@chronon

This comment has been minimized.

Copy link
Owner Author

@chronon chronon commented Jan 20, 2020

@asiby Great idea to share some of the extra steps - below is my version of gd and a couple of others.


Reminder: combine these into a single RUN command if using more than one.

extension: gd

RUN apt-get update \
	&& apt-get install -y \
		libfreetype6-dev \
		libpng-dev \
		libjpeg-dev \
	&& docker-php-ext-configure gd \
		--with-freetype-dir=/usr/include/ \
		--with-jpeg-dir=/usr/include/ \
		--with-png-dir=/usr/include/ \
	&& docker-php-ext-install -j$(nproc) \
		gd \
	&& apt-get purge -y \
		libfreetype6-dev \
		libpng-dev \
		libjpeg-dev

extension: intl

RUN apt-get update \
	&& apt-get install -y \
		libicu-dev \
	&& docker-php-ext-install -j$(nproc) \
		intl \
	&& apt-get purge -y \
		libicu-dev

extension: imap

RUN apt-get update \
	&& apt-get install -y \
		libc-client-dev
		libkrb5-dev
	&& docker-php-ext-configure imap \
		--with-kerberos \
		--with-imap-ssl \
	&& docker-php-ext-install -j$(nproc) \
		imap \
	&& apt-get purge -y \
		libc-client-dev \
		libkrb5-dev

extension: imagick (pecl)

RUN apt-get update \
	&& apt-get install -y \
		libmagickwand-dev --no-install-recommends \
		ghostscript --no-install-recommends \
	&& pecl install \
		imagick \
	&& docker-php-ext-enable \
		imagick \
	&& apt-get purge -y \
		libmagickwand-dev
@asiby

This comment has been minimized.

Copy link

@asiby asiby commented Jan 20, 2020

Excellent. I prefer your steps better and the fact that they clean up after themselves.

@asiby

This comment has been minimized.

Copy link

@asiby asiby commented Mar 11, 2020

extension: mysqli

RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.