Dockerfile-72 2.0 KB

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