Files
docker-php-fpm/Dockerfiles/prod/Dockerfile-7.2
2018-08-02 13:12:12 +02:00

78 lines
1.5 KiB
Groff

# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
FROM devilbox/php-fpm:7.2-mods
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.2 Image" \
image="devilbox/php-fpm" \
tag="7.2-prod" \
vendor="devilbox" \
license="MIT"
###
### Install
###
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
locales-all \
postfix \
postfix-pcre \
rsyslog \
socat \
supervisor \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor
###
### Verify
###
RUN set -x \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
&& /usr/local/sbin/php-fpm --test \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
###
### Copy files
###
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
COPY ./data/postfix.sh /usr/local/sbin/postfix.sh
COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
###
### Volumes
###
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d
VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
EXPOSE 9000
###
### Entrypoint
###
ENTRYPOINT ["/docker-entrypoint.sh"]