# hadolint ignore=DL3007 FROM benzine/marshall:latest AS php-core LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \ org.label-schema.vcs-url="https://github.com/benzine-framework/docker" \ org.opencontainers.image.source="https://github.com/benzine-framework/docker" ARG PHP_PACKAGES ARG COMPOSER_UPDATE_FLAGS ENV COMPOSER_ALLOW_SUPERUSER=1 COPY core/install-report.sh /usr/bin/install-report SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN echo "APT::Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \ echo "Acquire::http::No-Cache=true;" > /etc/apt/apt.conf.d/80-no-cache && \ echo "Acquire::http::Pipeline-Depth=0;" > /etc/apt/apt.conf.d/80-no-pipeline && \ apt-get -qq update && \ apt-get -yqq upgrade && \ apt-get -yqq install --no-install-recommends \ python3-software-properties \ software-properties-common \ && \ echo "PHP packages to install:" && echo $PHP_PACKAGES && \ add-apt-repository -y ppa:ondrej/php && \ apt-get -qq update && \ apt-get -yqq install --no-install-recommends $PHP_PACKAGES &&\ apt-get remove -yqq \ software-properties-common \ python-apt-common \ python3-software-properties \ python3.5 python3.5-minimal libpython3.5-minimal \ && \ apt-get autoremove -yqq && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/status.old /var/cache/debconf/templates.dat /var/log/dpkg.log /var/log/lastlog /var/log/apt/*.log && \ rm -rf /usr/bin/mariabackup \ /usr/bin/mysql_embedded \ /usr/bin/mysql_find_rows \ /usr/bin/mysql_fix_extensions \ /usr/bin/mysql_waitpid \ /usr/bin/mysqlaccess \ /usr/bin/mysqlanalyze \ /usr/bin/mysqlcheck \ /usr/bin/mysqldump \ /usr/bin/mysqldumpslow \ /usr/bin/mysqlimport \ /usr/bin/mysqloptimize \ /usr/bin/mysqlrepair \ /usr/bin/mysqlreport \ /usr/bin/mysqlshow \ /usr/bin/mysqlslap \ /usr/bin/mytop RUN chmod +x /usr/bin/install-report && \ /usr/bin/install-report RUN curl https://getcomposer.org/composer-stable.phar --output /usr/local/bin/composer && \ chmod +x /usr/local/bin/composer /usr/bin/install-report && \ composer self-update ${COMPOSER_UPDATE_FLAGS}