- temporary disable igbinary, because install not successfully completed with segmentation fault * partition of tune opts semantically divided - remove unused env-vars from docker compose base in src and user space builds
		
			
				
	
	
		
			53 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM dimti/php:7.4
 | 
						|
 | 
						|
###########################################################################
 | 
						|
# Redis and igbinary:
 | 
						|
###########################################################################
 | 
						|
 | 
						|
ARG INSTALL_REDIS=false
 | 
						|
 | 
						|
COPY ./igbinary.ini /usr/local/etc/php/conf.d/igbinary.ini
 | 
						|
 | 
						|
RUN if [ ${INSTALL_REDIS} = true ]; then \
 | 
						|
    pecl install -a igbinary \
 | 
						|
    && docker-php-ext-enable igbinary \
 | 
						|
    && printf "yes\n" | pecl install redis \
 | 
						|
    && docker-php-ext-enable redis \
 | 
						|
;fi
 | 
						|
 | 
						|
###########################################################################
 | 
						|
# Pear Mail and Mail_Mime:
 | 
						|
###########################################################################
 | 
						|
 | 
						|
ARG INSTALL_PEAR_MAIL=false
 | 
						|
 | 
						|
RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
 | 
						|
    pear install Mail && pear install Mail_Mime \
 | 
						|
;fi
 | 
						|
 | 
						|
###########################################################################
 | 
						|
# Tune opts:
 | 
						|
###########################################################################
 | 
						|
 | 
						|
ARG PHP_OPT_SHORT_OPEN_TAG=Off
 | 
						|
RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" "$PHP_INI_DIR/php.ini"
 | 
						|
 | 
						|
ARG PHP_OPT_MAX_EXECUTION_TIME=30
 | 
						|
RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" "$PHP_INI_DIR/php.ini"
 | 
						|
 | 
						|
ARG PHP_OPT_MEMORY_LIMIT=128M
 | 
						|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
 | 
						|
 | 
						|
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=2M
 | 
						|
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"
 | 
						|
 | 
						|
###########################################################################
 | 
						|
# Locales:
 | 
						|
###########################################################################
 | 
						|
 | 
						|
RUN apt update && \
 | 
						|
    apt install -y locales && \
 | 
						|
    sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
 | 
						|
    sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
 | 
						|
    locale-gen
 |