Dockerfile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FROM php:fpm-stretch
  2. # Setup necessary env vars
  3. ENV DEBIAN_FRONTEND=noninteractive
  4. ENV LC_ALL=C.UTF-8
  5. ENV LANG=C.UTF-8
  6. # Basic Prep
  7. RUN apt-get update \
  8. && apt-get install -y --no-install-recommends curl supervisor
  9. # Setup locales
  10. RUN apt-get install -y --no-install-recommends locales
  11. COPY locale/default /etc/default/locale
  12. COPY locale/locale.gen /etc/locale.gen
  13. RUN locale-gen
  14. # PHP dependencies
  15. RUN apt-get install -y --no-install-recommends \
  16. zlib1g-dev libicu-dev build-essential libcurl4-openssl-dev \
  17. && docker-php-ext-install -j$(nproc) intl \
  18. && docker-php-ext-install -j$(nproc) mbstring \
  19. && docker-php-ext-install -j$(nproc) curl \
  20. && docker-php-ext-install gettext \
  21. && apt-get remove -y --purge zlib1g-dev libicu-dev build-essential libcurl4-openssl-dev \
  22. && apt-get autoremove -y --purge
  23. # Halcyon
  24. WORKDIR /opt/halcyon
  25. RUN apt-get install -y --no-install-recommends git \
  26. && git clone https://notabug.org/halcyon-suite/halcyon.git /opt/halcyon/ \
  27. && git checkout `git describe --tags` \
  28. && cp -r /opt/halcyon/config /opt/halcyon/config.example \
  29. && chown -R www-data: /opt/halcyon
  30. # PHP-fpm
  31. RUN \
  32. # Bring php-fpm configs into a more controallable state
  33. rm /usr/local/etc/php-fpm.d/www.conf.default \
  34. && mv /usr/local/etc/php-fpm.d/docker.conf /usr/local/etc/php-fpm.d/00-docker.conf \
  35. && mv /usr/local/etc/php-fpm.d/www.conf /usr/local/etc/php-fpm.d/10-www.conf \
  36. && mv /usr/local/etc/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/20-docker.conf
  37. # Copy necessary configs
  38. ADD etc/ /etc/
  39. ADD usr/ /usr/
  40. EXPOSE 9000
  41. ENTRYPOINT ["/usr/bin/supervisord","-c","/etc/supervisord.conf"]