yoesoff

php-fpm-Dockerfile

Aug 17th, 2019
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.51 KB | None | 0 0
  1. FROM php:7.3-fpm
  2. MAINTAINER Yoesoff <[email protected]>
  3. # Update
  4. RUN apt-get update
  5. RUN apt-get install -y libbz2-dev unzip
  6.  
  7. # Install
  8. RUN docker-php-ext-install opcache bcmath bz2 calendar dba mbstring
  9.  
  10. # Redis and MongoDB
  11. RUN pecl install redis && docker-php-ext-enable redis
  12. RUN pecl install mongodb && docker-php-ext-enable mongodb
  13.  
  14. # Install APCU
  15. RUN pecl install apcu
  16.  
  17. # PHP.INI Settings
  18. RUN echo 'memory_limit = 3G' >> /usr/local/etc/php/conf.d/memlimit.ini;
  19. RUN echo 'max_execution_time = 18000' >> /usr/local/etc/php/conf.d/max_execution_time.ini;
  20. RUN echo 'extension=apcu.so' >> /usr/local/etc/php/conf.d/apcu.ini
  21.  
  22. # Install Stuff
  23. RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
  24. RUN apt-get install -y --no-install-recommends apt-utils libcurl4 libcurl4-gnutls-dev
  25. RUN apt-get install -y --no-install-recommends software-properties-common
  26.  
  27. RUN apt-get install -y --no-install-recommends libzip-dev build-essential gnupg2  snmpd snmp libsnmp-dev wget iputils-ping libicu-dev vim git
  28. RUN apt-get install -y --no-install-recommends libfreetype6-dev libjpeg62-turbo-dev libxpm-dev libpng-dev    
  29.  
  30. # PHP GD
  31. RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ --with-xpm-dir=/usr/include/ --enable-gd-jis-conv
  32. RUN docker-php-ext-install -j$(nproc) gd
  33. # END PHP GD
  34.  
  35. RUN apt-get install -y --no-install-recommends libxml2-dev libldb-dev libxml2-dev libssl-dev libxslt-dev libpq-dev libsqlite3-dev libsqlite3-0 libc-client-dev libkrb5-dev firebird-dev libpspell-dev aspell-en aspell-de libtidy-dev librecode0 librecode-dev
  36. RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
  37.  
  38. RUN docker-php-ext-install -j$(nproc) soap ftp xsl ctype dom zip session
  39. RUN docker-php-ext-install -j$(nproc) json hash sockets pdo tokenizer pgsql pdo_pgsql pdo_mysql pdo_sqlite intl mysqli
  40. RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
  41. RUN docker-php-ext-install -j$(nproc) imap curl exif fileinfo gettext iconv interbase pdo_firebird pcntl phar posix pspell recode shmop simplexml snmp sysvmsg sysvsem sysvshm tidy wddx xml xmlrpc xmlwriter
  42.  
  43. # Install Node
  44. RUN apt install -y nodejs npm
  45. RUN npm i -g npm@latest
  46. RUN npm i -g yarn@latest
  47. RUN npm i -g foreman
  48. RUN npm i -g webpack
  49. RUN npm i -g webpack-cli
  50.  
  51. # Set Timezone
  52. RUN rm /etc/localtime
  53. RUN ln -s /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
  54. RUN "date"
  55. # End Timezone
  56.  
  57. WORKDIR /var/www
Advertisement
Add Comment
Please, Sign In to add comment