44 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
		
		
			
		
	
	
			44 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
| 
								 | 
							
								FROM dimti/php:5.6
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								###########################################################################
							 | 
						||
| 
								 | 
							
								# 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
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								###########################################################################
							 | 
						||
| 
								 | 
							
								# xDebug (termporary):
							 | 
						||
| 
								 | 
							
								###########################################################################
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								# Copy xdebug configuration for remote debugging
							 | 
						||
| 
								 | 
							
								COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								###########################################################################
							 | 
						||
| 
								 | 
							
								# Permission denied on /tmp folder:
							 | 
						||
| 
								 | 
							
								###########################################################################
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								RUN chmod 1777 /tmp
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								###########################################################################
							 | 
						||
| 
								 | 
							
								# 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=600
							 | 
						||
| 
								 | 
							
								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=256M
							 | 
						||
| 
								 | 
							
								RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								ARG PHP_OPT_POST_MAX_SIZE=48M
							 | 
						||
| 
								 | 
							
								RUN sed -i "s/^post_max_size = .*/post_max_size = $PHP_OPT_POST_MAX_SIZE/g" "$PHP_INI_DIR/php.ini"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								ARG PHP_OPT_UPLOAD_MAX_FILESIZE=16M
							 | 
						||
| 
								 | 
							
								RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"
							 |