Docker image with PHP, extensions and PHP-FPM
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.0 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. FROM php:5.6-fpm
  2. # Get repository and install wget and vim
  3. RUN apt-get update && apt-get install --no-install-recommends -y \
  4. wget \
  5. vim \
  6. git \
  7. unzip
  8. # Add PostgreSQL repository
  9. RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgdg.list
  10. RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
  11. apt-key add -
  12. # Install Oracle Instantclient
  13. RUN mkdir /opt/oracle \
  14. && cd /opt/oracle \
  15. && wget https://s3.amazonaws.com/merofile/instantclient-basic-linux.x64-12.1.0.2.0.zip \
  16. && wget https://s3.amazonaws.com/merofile/instantclient-sdk-linux.x64-12.1.0.2.0.zip \
  17. && unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
  18. && unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
  19. && ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so \
  20. && ln -s /opt/oracle/instantclient_12_1/libclntshcore.so.12.1 /opt/oracle/instantclient_12_1/libclntshcore.so \
  21. && ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so \
  22. && rm -rf /opt/oracle/*.zip
  23. # Install PHP extensions deps
  24. RUN apt-get update \
  25. && apt-get install --no-install-recommends -y \
  26. postgresql-server-dev-9.5 \
  27. libfreetype6-dev \
  28. libjpeg62-turbo-dev \
  29. libmcrypt-dev \
  30. libpng12-dev \
  31. zlib1g-dev \
  32. libicu-dev \
  33. g++ \
  34. unixodbc-dev \
  35. libxml2-dev \
  36. libaio-dev \
  37. libgearman-dev \
  38. libmemcached-dev \
  39. freetds-dev
  40. # Install Composer
  41. RUN curl -sS https://getcomposer.org/installer | php -- \
  42. --install-dir=/usr/local/bin \
  43. --filename=composer
  44. # Install PHP extensions
  45. RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
  46. && echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.10 \
  47. && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \
  48. && docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
  49. && pecl install apcu-4.0.10 \
  50. && pecl install redis-2.2.8 \
  51. && pecl install gearman \
  52. && pecl install memcached \
  53. && docker-php-ext-install \
  54. iconv \
  55. mbstring \
  56. intl \
  57. mcrypt \
  58. gd \
  59. pgsql \
  60. mysqli \
  61. pdo_pgsql \
  62. pdo_mysql \
  63. pdo_oci \
  64. pdo_dblib \
  65. soap \
  66. sockets \
  67. zip \
  68. pcntl \
  69. ftp \
  70. && docker-php-ext-enable \
  71. oci8 \
  72. apcu \
  73. memcached \
  74. redis \
  75. gearman \
  76. opcache
  77. # Install PHPUnit
  78. RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \
  79. && chmod +x /usr/local/bin/phpunit
  80. # Clean repository
  81. RUN apt-get clean \
  82. && rm -rf /var/lib/apt/lists/*