-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed8e303
commit 7f1b169
Showing
3 changed files
with
174 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
FROM php:8.3 | ||
|
||
ENV XDEBUG_VERSION 3.3.1 | ||
|
||
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser | ||
ENV COMPOSER_ALLOW_SUPERUSER=1 | ||
# https://getcomposer.org/doc/03-cli.md#composer-no-interaction | ||
ENV COMPOSER_NO_INTERACTION=1 | ||
|
||
RUN additionalPackages=" \ | ||
apt-transport-https \ | ||
git \ | ||
wget \ | ||
gnupg \ | ||
msmtp-mta \ | ||
subversion \ | ||
mariadb-client \ | ||
openssh-client \ | ||
rsync \ | ||
unzip \ | ||
locales \ | ||
" \ | ||
buildDeps=" \ | ||
freetds-dev \ | ||
libbz2-dev \ | ||
libc-client-dev \ | ||
libffi-dev \ | ||
libfreetype6-dev \ | ||
libgmp3-dev \ | ||
libicu-dev \ | ||
libjpeg62-turbo-dev \ | ||
libmagickwand-dev \ | ||
libkrb5-dev \ | ||
libldap2-dev \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
libpq-dev \ | ||
libpspell-dev \ | ||
libonig-dev \ | ||
librabbitmq-dev \ | ||
libsasl2-dev \ | ||
libsnmp-dev \ | ||
libssl-dev \ | ||
libtidy-dev \ | ||
libxml2-dev \ | ||
libxpm-dev \ | ||
libxslt1-dev \ | ||
zlib1g-dev \ | ||
libzip-dev \ | ||
" \ | ||
&& runDeps=" \ | ||
imagemagick \ | ||
libc-client2007e \ | ||
libfreetype6 \ | ||
libicu-dev \ | ||
libjpeg62-turbo \ | ||
libpq5 \ | ||
libsybdb5 \ | ||
libtidy-dev \ | ||
libx11-dev \ | ||
libxpm4 \ | ||
libxslt1.1 \ | ||
libzip4 \ | ||
snmp \ | ||
" \ | ||
&& phpModules=" \ | ||
bcmath \ | ||
bz2 \ | ||
calendar \ | ||
dba \ | ||
exif \ | ||
ffi \ | ||
ftp \ | ||
gd \ | ||
gettext \ | ||
gmp \ | ||
imap \ | ||
intl \ | ||
ldap \ | ||
mysqli \ | ||
opcache \ | ||
pcntl \ | ||
pdo \ | ||
pdo_dblib \ | ||
pdo_mysql \ | ||
pdo_pgsql \ | ||
pgsql \ | ||
pspell \ | ||
shmop \ | ||
snmp \ | ||
soap \ | ||
sockets \ | ||
sysvmsg \ | ||
sysvsem \ | ||
sysvshm \ | ||
tidy \ | ||
xsl \ | ||
zip \ | ||
xdebug \ | ||
" \ | ||
&& peclModules=" \ | ||
amqp \ | ||
igbinary \ | ||
imagick \ | ||
mongodb \ | ||
redis \ | ||
" \ | ||
&& echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup \ | ||
&& echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $additionalPackages $buildDeps $runDeps \ | ||
&& docker-php-source extract \ | ||
&& cd /usr/src/php/ext/ \ | ||
&& curl -L https://xdebug.org/files/xdebug-$XDEBUG_VERSION.tgz | tar -zxf - \ | ||
&& mv xdebug-$XDEBUG_VERSION xdebug \ | ||
&& ln -s /usr/include/*-linux-gnu/gmp.h /usr/include/gmp.h \ | ||
&& ln -s /usr/lib/*-linux-gnu/libldap_r.so /usr/lib/libldap.so \ | ||
&& ln -s /usr/lib/*-linux-gnu/libldap_r.a /usr/lib/libldap_r.a \ | ||
&& ln -s /usr/lib/*-linux-gnu/libsybdb.a /usr/lib/libsybdb.a \ | ||
&& ln -s /usr/lib/*-linux-gnu/libsybdb.so /usr/lib/libsybdb.so \ | ||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ | ||
&& docker-php-ext-configure imap --with-imap --with-kerberos --with-imap-ssl \ | ||
&& docker-php-ext-configure ldap --with-ldap-sasl \ | ||
&& docker-php-ext-install $phpModules \ | ||
&& for ext in $phpModules; do \ | ||
rm -f /usr/local/etc/php/conf.d/docker-php-ext-$ext.ini; \ | ||
done \ | ||
&& pecl install $peclModules \ | ||
&& docker-php-source delete \ | ||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Configure locales (make en_US and nl_NL available) | ||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
sed -i -e 's/# nl_NL.UTF-8 UTF-8/nl_NL.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
dpkg-reconfigure --frontend=noninteractive locales | ||
|
||
# Install composer and put binary into $PATH | ||
RUN curl -sS https://getcomposer.org/installer | php \ | ||
&& mv composer.phar /usr/local/bin/ \ | ||
&& ln -s /usr/local/bin/composer.phar /usr/local/bin/composer | ||
|
||
# Install phpunit and put binary into $PATH | ||
RUN curl -sSLo phpunit.phar https://phar.phpunit.de/phpunit.phar \ | ||
&& chmod 755 phpunit.phar \ | ||
&& mv phpunit.phar /usr/local/bin/ \ | ||
&& ln -s /usr/local/bin/phpunit.phar /usr/local/bin/phpunit | ||
|
||
# Install PHP Code sniffer | ||
RUN curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar \ | ||
&& chmod 755 phpcs.phar \ | ||
&& mv phpcs.phar /usr/local/bin/ \ | ||
&& ln -s /usr/local/bin/phpcs.phar /usr/local/bin/phpcs \ | ||
&& curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar \ | ||
&& chmod 755 phpcbf.phar \ | ||
&& mv phpcbf.phar /usr/local/bin/ \ | ||
&& ln -s /usr/local/bin/phpcbf.phar /usr/local/bin/phpcbf | ||
|
||
# Install Node.js & Yarn | ||
RUN curl -fsSL https://raw.githubusercontent.com/tj/n/master/bin/n | bash -s lts \ | ||
&& npm install -g n && n 20 \ | ||
&& npm install -g yarn | ||
|
||
COPY msmtprc /etc/ | ||
COPY entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["php", "-a"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters