add php_configure extensions helper
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							
								
								
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -31,11 +31,11 @@ RUN apk add --no-cache wget \ | ||||
|     jpeg-dev \ | ||||
|     libjpeg-turbo-dev | ||||
|  | ||||
| RUN docker-php-ext-configure gd \ | ||||
|         --with-freetype-dir=/usr/lib/ \ | ||||
|         --with-png-dir=/usr/lib/ \ | ||||
|         --with-jpeg-dir=/usr/lib/ \ | ||||
|         --with-gd | ||||
| COPY docker/ / | ||||
|  | ||||
| # Configure php extensions | ||||
| RUN /usr/local/bin/php_configure.sh | ||||
|  | ||||
|  | ||||
| # Install php extensions | ||||
| RUN docker-php-ext-install -j$(nproc) \ | ||||
| @@ -74,7 +74,7 @@ FROM php:${PHP_VERSION} | ||||
| ARG ENVIRONMENT=production | ||||
|  | ||||
| # install system libs | ||||
| RUN apk add --no-cache libintl c-client libpng icu-libs libldap libpq libzip shadow sudo | ||||
| RUN apk add --no-cache libintl c-client libpng icu-libs libldap libpq libjpeg freetype libzip shadow sudo | ||||
|  | ||||
| # Install apps | ||||
| RUN apk add --no-cache wget curl bash git openssh supervisor nginx openssl zip  | ||||
|   | ||||
							
								
								
									
										13
									
								
								docker/usr/local/bin/php_configure.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								docker/usr/local/bin/php_configure.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| PHP_VERSION=`php -r 'echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;'` | ||||
|  | ||||
| if [ $PHP_VERSION = '74' ]; then  | ||||
| 	docker-php-ext-configure gd --with-freetype --with-jpeg | ||||
| else  | ||||
| 	docker-php-ext-configure gd \ | ||||
|         --with-freetype-dir=/usr/lib/ \ | ||||
|         --with-png-dir=/usr/lib/ \ | ||||
|         --with-jpeg-dir=/usr/lib/ \ | ||||
|         --with-gd | ||||
| fi | ||||
		Reference in New Issue
	
	Block a user