ARG BASE_IMAGE FROM ${BASE_IMAGE} as base COPY ./images/php/cron/conf.d/psc /etc/cron.d/ COPY ./images/php/cron/bin/ /usr/bin/ COPY ./images/php/fpm/conf.d/policy.xml /etc/ImageMagick-6/policy.xml RUN chmod +x /usr/bin/start-cron.sh RUN chmod +x /usr/bin/set-env.sh RUN chmod 0600 /etc/cron.d/psc RUN apt-get update && apt-get install -y cron rsyslog RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf FROM base as prod CMD ["/usr/bin/set-env.sh"] FROM base as ci CMD ["/usr/bin/set-env.sh"] FROM base as local CMD ["/usr/bin/set-env.sh"]