2019-01-05 21:02:04 +01:00
|
|
|
FROM php:fpm-stretch
|
|
|
|
|
|
|
|
# Setup necessary env vars
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
ENV LC_ALL=C.UTF-8
|
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
|
|
|
|
# Basic Prep
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --no-install-recommends curl supervisor
|
|
|
|
|
|
|
|
# Setup locales
|
|
|
|
RUN apt-get install -y --no-install-recommends locales
|
|
|
|
COPY locale/default /etc/default/locale
|
|
|
|
COPY locale/locale.gen /etc/locale.gen
|
|
|
|
RUN locale-gen
|
|
|
|
|
|
|
|
# PHP dependencies
|
|
|
|
RUN apt-get install -y --no-install-recommends \
|
|
|
|
zlib1g-dev libicu-dev build-essential libcurl4-openssl-dev \
|
|
|
|
&& docker-php-ext-install -j$(nproc) intl \
|
|
|
|
&& docker-php-ext-install -j$(nproc) mbstring \
|
|
|
|
&& docker-php-ext-install -j$(nproc) curl \
|
|
|
|
&& docker-php-ext-install gettext \
|
|
|
|
&& apt-get remove -y --purge zlib1g-dev libicu-dev build-essential libcurl4-openssl-dev \
|
|
|
|
&& apt-get autoremove -y --purge
|
|
|
|
|
|
|
|
# Halcyon
|
2019-01-06 20:47:24 +01:00
|
|
|
WORKDIR /opt/halcyon
|
2019-01-05 21:02:04 +01:00
|
|
|
RUN apt-get install -y --no-install-recommends git \
|
2019-01-06 20:47:24 +01:00
|
|
|
&& git clone https://notabug.org/halcyon-suite/halcyon.git /opt/halcyon/ \
|
2019-01-05 21:02:04 +01:00
|
|
|
&& git checkout `git describe --tags` \
|
2019-01-06 20:47:24 +01:00
|
|
|
&& cp -r /opt/halcyon/config /opt/halcyon/config.example \
|
|
|
|
&& chown -R www-data: /opt/halcyon
|
|
|
|
|
|
|
|
# PHP-fpm
|
|
|
|
RUN \
|
2019-01-05 21:02:04 +01:00
|
|
|
# Bring php-fpm configs into a more controallable state
|
2019-01-06 20:47:24 +01:00
|
|
|
rm /usr/local/etc/php-fpm.d/www.conf.default \
|
2019-01-05 21:02:04 +01:00
|
|
|
&& mv /usr/local/etc/php-fpm.d/docker.conf /usr/local/etc/php-fpm.d/00-docker.conf \
|
|
|
|
&& mv /usr/local/etc/php-fpm.d/www.conf /usr/local/etc/php-fpm.d/10-www.conf \
|
|
|
|
&& mv /usr/local/etc/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/20-docker.conf
|
|
|
|
|
|
|
|
# Copy necessary configs
|
|
|
|
ADD etc/ /etc/
|
|
|
|
ADD usr/ /usr/
|
|
|
|
|
2019-01-06 20:47:24 +01:00
|
|
|
EXPOSE 9000
|
2019-01-05 21:02:04 +01:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/supervisord","-c","/etc/supervisord.conf"]
|
|
|
|
|