MaketRandevu/docker/php-fpm/Dockerfile

30 lines
1.4 KiB
Docker
Raw Normal View History

FROM php:8.2-fpm
WORKDIR "/var/www/html"
RUN apt-get update \
2023-07-24 10:32:47 +03:00
&& apt-get install -y --no-install-recommends \
git \
zip \
unzip \
&& curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
2023-07-24 10:32:47 +03:00
curl gd intl ldap mbstring mysqli odbc pdo pdo_mysql soap sockets xml zip xdebug exif sqlite3 gettext bcmath csv event imap inotify mcrypt redis \
&& docker-php-ext-enable xdebug \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& curl -sLS https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& apt-get install -q -y ssmtp mailutils \
&& echo "hostname=localhost.localdomain" > /etc/ssmtp/ssmtp.conf \
2023-07-08 08:31:33 +03:00
&& echo "root=root@example.org" >> /etc/ssmtp/ssmtp.conf \
&& echo "mailhub=mailpit:1025" >> /etc/ssmtp/ssmtp.conf \
&& echo "sendmail_path=/usr/sbin/ssmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini \
2023-07-08 08:31:33 +03:00
&& echo "alias ll=\"ls -al\"" >> /root/.bashrc \
&& echo "export XDEBUG_TRIGGER=1" >> /root/.bashrc \
&& echo "export PHP_IDE_CONFIG=\"serverName=host.docker.internal\"" >> /root/.bashrc \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD ["bash", "docker/php-fpm/start-container"]