Dockerfile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #
  2. #--------------------------------------------------------------------------
  3. # Image Setup
  4. #--------------------------------------------------------------------------
  5. #
  6. ARG PHP_VERSION=${PHP_VERSION}
  7. FROM php:${PHP_VERSION}-alpine
  8. LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
  9. RUN apk --update add wget \
  10. curl \
  11. git \
  12. build-base \
  13. libmemcached-dev \
  14. libmcrypt-dev \
  15. libxml2-dev \
  16. zlib-dev \
  17. autoconf \
  18. cyrus-sasl-dev \
  19. libgsasl-dev \
  20. supervisor
  21. RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
  22. RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
  23. #Install BCMath package:
  24. ARG INSTALL_BCMATH=false
  25. RUN if [ ${INSTALL_BCMATH} = true ]; then \
  26. docker-php-ext-install bcmath \
  27. ;fi
  28. # Install PostgreSQL drivers:
  29. ARG INSTALL_PGSQL=false
  30. RUN if [ ${INSTALL_PGSQL} = true ]; then \
  31. apk --update add postgresql-dev \
  32. && docker-php-ext-install pdo_pgsql \
  33. ;fi
  34. RUN rm /var/cache/apk/* \
  35. && mkdir -p /var/www
  36. #
  37. #--------------------------------------------------------------------------
  38. # Optional Supervisord Configuration
  39. #--------------------------------------------------------------------------
  40. #
  41. # Modify the ./supervisor.conf file to match your App's requirements.
  42. # Make sure you rebuild your container with every change.
  43. #
  44. COPY supervisord.conf /etc/supervisord.conf
  45. ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
  46. #
  47. #--------------------------------------------------------------------------
  48. # Optional Software's Installation
  49. #--------------------------------------------------------------------------
  50. #
  51. # If you need to modify this image, feel free to do it right here.
  52. #
  53. # -- Your awesome modifications go here -- #
  54. #
  55. #--------------------------------------------------------------------------
  56. # Check PHP version
  57. #--------------------------------------------------------------------------
  58. #
  59. RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}."
  60. #
  61. #--------------------------------------------------------------------------
  62. # Final Touch
  63. #--------------------------------------------------------------------------
  64. #
  65. WORKDIR /etc/supervisor/conf.d/