2017-12-07 04:19:02 +00:00
|
|
|
# NAME leenooks/php
|
2019-05-03 02:53:30 +00:00
|
|
|
# VERSION 7.3-fpm-mp
|
2017-12-07 04:19:02 +00:00
|
|
|
|
2019-05-03 02:53:30 +00:00
|
|
|
FROM php:7.3-fpm
|
2018-02-27 08:28:17 +00:00
|
|
|
|
2020-01-22 10:41:30 +00:00
|
|
|
RUN apt-get update && apt-get install -y openssh-server unzip git msmtp \
|
2019-09-09 11:22:54 +00:00
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2017-12-13 10:54:20 +00:00
|
|
|
|
2019-09-09 11:22:54 +00:00
|
|
|
RUN useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp
|
|
|
|
RUN sed -e 's/^expose_php = On/expose_php = Off/' /usr/local/etc/php/php.ini-production > /usr/local/etc/php/php.ini
|
2019-09-09 11:41:36 +00:00
|
|
|
COPY www.conf /usr/local/etc/php-fpm.d/
|
|
|
|
|
|
|
|
COPY sshd_config.patch /tmp/
|
2017-12-13 10:54:20 +00:00
|
|
|
RUN (cd / && patch -p0 ) < /tmp/sshd_config.patch && rm /tmp/sshd_config.patch
|
|
|
|
|
2019-09-09 11:22:54 +00:00
|
|
|
COPY msmtprc /etc/
|
|
|
|
RUN sed -i -e 's#^;sendmail_path =#sendmail_path = "/usr/bin/msmtp -t"#' /usr/local/etc/php/php.ini
|
|
|
|
|
2018-01-29 04:23:52 +00:00
|
|
|
EXPOSE 9000/tcp 22/tcp
|
|
|
|
|
2020-01-20 03:28:58 +00:00
|
|
|
# Add composer
|
2018-05-07 03:34:45 +00:00
|
|
|
RUN curl https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer
|
|
|
|
|
2020-01-22 10:41:30 +00:00
|
|
|
# Mysql/Postgress/LDAP
|
|
|
|
RUN apt-get update && apt-get install -y openssh-server libpq5 libpq-dev unzip git libldap2-dev \
|
|
|
|
&& docker-php-ext-install -j$(nproc) pdo_mysql pdo_pgsql ldap gettext \
|
2020-01-22 11:02:16 +00:00
|
|
|
&& apt-get -y purge libpq-dev libldap2-dev libx11-6 dbus ncurses-term systemd \
|
2020-01-22 10:41:30 +00:00
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Enable phpredis
|
|
|
|
RUN pecl install -o -f igbinary && pecl install -o -f redis && docker-php-ext-enable redis igbinary && rm -rf /tmp/*
|
|
|
|
|
2019-09-09 11:41:36 +00:00
|
|
|
COPY init /sbin/
|
2019-05-16 01:57:01 +00:00
|
|
|
RUN chmod 550 /sbin/init && chown 0:33 /sbin/init
|
2019-05-03 02:09:47 +00:00
|
|
|
ENTRYPOINT [ "/sbin/init" ]
|
2018-01-29 04:23:52 +00:00
|
|
|
CMD [ "php-fpm" ]
|