Updates
This commit is contained in:
parent
4418810ebc
commit
ca8d2c5001
41
Dockerfile
41
Dockerfile
|
|
@ -1,10 +1,8 @@
|
||||||
FROM php:7.4-fpm-alpine
|
FROM php:7.4-fpm
|
||||||
LABEL maintainer="Andrei Condurachi <andrei@condurachi.ro> (@acondura)"
|
LABEL maintainer="Andrei Condurachi <andrei@condurachi.ro> (@acondura)"
|
||||||
|
|
||||||
# Enable Apache Rewrite + Expires Module
|
# Ubuntu repo updates
|
||||||
RUN a2enmod rewrite expires && \
|
RUN apt-get update
|
||||||
sed -i 's/ServerTokens OS/ServerTokens ProductOnly/g' \
|
|
||||||
/etc/apache2/conf-available/security.conf
|
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
|
@ -17,6 +15,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
|
libmemcached11 \
|
||||||
|
libmemcachedutil2 \
|
||||||
|
build-essential \
|
||||||
|
libmemcached-dev \
|
||||||
g++ \
|
g++ \
|
||||||
git \
|
git \
|
||||||
cron \
|
cron \
|
||||||
|
|
@ -24,24 +26,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
&& docker-php-ext-install opcache \
|
&& docker-php-ext-install opcache \
|
||||||
&& docker-php-ext-configure intl \
|
&& docker-php-ext-configure intl \
|
||||||
&& docker-php-ext-install intl \
|
&& docker-php-ext-install intl \
|
||||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
|
||||||
&& docker-php-ext-install -j$(nproc) gd \
|
&& docker-php-ext-install -j$(nproc) gd imap openssl exif fileinfo \
|
||||||
&& docker-php-ext-install zip \
|
&& docker-php-ext-install zip \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# set recommended PHP.ini settings
|
# Enable Apache Rewrite + Expires Module
|
||||||
# see https://secure.php.net/manual/en/opcache.installation.php
|
RUN a2enmod rewrite expires && \
|
||||||
RUN { \
|
sed -i 's/ServerTokens OS/ServerTokens ProductOnly/g' \
|
||||||
echo 'opcache.memory_consumption=128'; \
|
/etc/apache2/conf-available/security.conf
|
||||||
echo 'opcache.interned_strings_buffer=8'; \
|
|
||||||
echo 'opcache.max_accelerated_files=4000'; \
|
# Install composer
|
||||||
echo 'opcache.revalidate_freq=2'; \
|
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
echo 'opcache.fast_shutdown=1'; \
|
|
||||||
echo 'opcache.enable_cli=1'; \
|
|
||||||
echo 'upload_max_filesize=128M'; \
|
|
||||||
echo 'post_max_size=128M'; \
|
|
||||||
echo 'expose_php=off'; \
|
|
||||||
} > /usr/local/etc/php/conf.d/php-recommended.ini
|
|
||||||
|
|
||||||
RUN pecl install apcu \
|
RUN pecl install apcu \
|
||||||
&& pecl install yaml-2.1.0 \
|
&& pecl install yaml-2.1.0 \
|
||||||
|
|
@ -70,12 +66,7 @@ EXPOSE 80/tcp
|
||||||
# Return to root user
|
# Return to root user
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# Copy init scripts
|
|
||||||
# COPY docker-entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
# provide container inside image for data persistence
|
# provide container inside image for data persistence
|
||||||
VOLUME ["/var/www/html"]
|
VOLUME ["/var/www/html"]
|
||||||
|
|
||||||
# ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
# CMD ["apache2-foreground"]
|
|
||||||
CMD ["sh", "-c", "apache2-foreground"]
|
CMD ["sh", "-c", "apache2-foreground"]
|
||||||
Loading…
Reference in New Issue