-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathphp.dockerfile
More file actions
16 lines (12 loc) · 792 Bytes
/
php.dockerfile
File metadata and controls
16 lines (12 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM php:8.0-fpm
RUN apt-get update && \
apt-get install -y \
zlib1g-dev libzip-dev sendmail
RUN echo "sendmail_path=/usr/sbin/sendmail -t -i" >> /usr/local/etc/php/conf.d/sendmail.ini
RUN docker-php-ext-install pdo pdo_mysql && \
pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.mode = debug" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.log = /var/log/xdebug/xdebug.log" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN sed -i '/#!\/bin\/sh/aservice sendmail restart' /usr/local/bin/docker-php-entrypoint
RUN sed -i '/#!\/bin\/sh/aecho "$(hostname -i)\t$(hostname) $(hostname).localhost" >> /etc/hosts' /usr/local/bin/docker-php-entrypoint