2017-12-07 04:19:02 +00:00
|
|
|
# NAME leenooks/php
|
2021-07-06 05:26:41 +00:00
|
|
|
# VERSION 8.0-fpm-latest
|
2017-12-07 04:19:02 +00:00
|
|
|
|
2021-05-04 01:31:21 +00:00
|
|
|
FROM php:8.0-fpm
|
2018-02-27 08:28:17 +00:00
|
|
|
|
2020-05-07 11:29:21 +00:00
|
|
|
RUN apt-get update && apt-get install -y openssh-server unzip git msmtp nginx wait-for-it \
|
2020-03-11 03:43:15 +00:00
|
|
|
&& rm /etc/nginx/sites-enabled/default \
|
2021-12-09 12:10:45 +00:00
|
|
|
&& apt-get -y purge nginx-core \
|
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/
|
2020-03-11 03:43:15 +00:00
|
|
|
COPY nginx-app.conf /etc/nginx/conf.d/
|
2019-09-09 11:41:36 +00:00
|
|
|
|
|
|
|
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/
|
2021-05-26 23:06:49 +00:00
|
|
|
RUN sed -i -e 's#^;sendmail_path =#sendmail_path = "/usr/bin/msmtp -t"#' /usr/local/etc/php/php.ini && sed -i -e 's#^memory_limit = 128M#memory_limit = 256M#' /usr/local/etc/php/php.ini
|
2019-09-09 11:22:54 +00:00
|
|
|
|
2020-03-11 03:43:15 +00:00
|
|
|
EXPOSE 22/tcp
|
2018-01-29 04:23:52 +00:00
|
|
|
|
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
|
|
|
|
|
2021-07-06 05:26:41 +00:00
|
|
|
# Add Mongo DB
|
2021-07-07 13:28:58 +00:00
|
|
|
RUN apt-get update && apt-get -y install zlib1g-dev libssl-dev \
|
|
|
|
&& pecl install mongodb && docker-php-ext-enable mongodb \
|
|
|
|
&& apt-get -y purge zlib1g-dev libssl-dev \
|
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2021-07-06 05:26:41 +00:00
|
|
|
|
2020-01-22 10:41:30 +00:00
|
|
|
# Mysql/Postgress/LDAP
|
2021-12-09 12:10:45 +00:00
|
|
|
RUN apt-get update && apt-get install -y libpq5 libpq-dev unzip git libldap2-dev \
|
2020-01-22 10:41:30 +00:00
|
|
|
&& 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
|
2021-06-09 02:12:06 +00:00
|
|
|
RUN apt-get update && apt-get install -y redis \
|
|
|
|
&& pecl install -o -f igbinary && pecl install -o -f redis && docker-php-ext-enable redis igbinary \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2020-01-22 10:41:30 +00:00
|
|
|
|
2021-06-09 01:37:15 +00:00
|
|
|
# Enable phpmemcache
|
|
|
|
RUN apt-get update && apt-get install -y memcached libmemcachedutil2 zlib1g-dev libmemcached-dev \
|
|
|
|
&& pecl install -o -f memcached && docker-php-ext-enable memcached \
|
|
|
|
&& apt-get -y purge zlib1g-dev libmemcached-dev \
|
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2021-07-06 05:26:41 +00:00
|
|
|
# Enable ZIP
|
|
|
|
RUN apt-get -y update \
|
|
|
|
&& apt-get -y install build-essential libzip4 libzip-dev libpng16-16 libpng-dev libbz2-dev zlib1g-dev libgmp-dev libjpeg62-turbo libjpeg-dev libfreetype6 libfreetype6-dev --no-install-recommends \
|
|
|
|
&& docker-php-ext-configure gd --with-freetype=/usr/include/freetype2 --with-jpeg=/usr/include/ \
|
|
|
|
&& docker-php-ext-install -j$(nproc) zip bz2 gd \
|
|
|
|
&& apt-get purge -y build-essential libzip-dev zlib1g-dev libpng-dev libbz2-dev zlib1g-dev libgmp-dev libjpeg-dev libfreetype6-dev \
|
|
|
|
&& apt-get autoremove -y \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/*
|
|
|
|
|
2022-06-26 01:42:56 +00:00
|
|
|
# Add bcmath
|
|
|
|
RUN apt-get -y update \
|
|
|
|
&& apt-get -y install build-essential libicu-dev \
|
|
|
|
&& docker-php-ext-install -j$(nproc) bcmath intl \
|
|
|
|
&& apt-get purge -y build-essential libicu-dev \
|
|
|
|
&& apt-get autoremove -y \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/*
|
|
|
|
|
2019-09-09 11:41:36 +00:00
|
|
|
COPY init /sbin/
|
2020-01-24 12:09:56 +00:00
|
|
|
RUN chmod 550 /sbin/init && chown 0:0 /sbin/init
|
2019-05-03 02:09:47 +00:00
|
|
|
ENTRYPOINT [ "/sbin/init" ]
|
2018-01-29 04:23:52 +00:00
|
|
|
CMD [ "php-fpm" ]
|