FROM wordpress:5.7.2 AS development

LABEL org.opencontainers.image.authors="Mike Mellor <mike.mellor@avalerehealth.com>"

# Install mysql client
RUN apt-get update && \
    apt-get install -y mariadb-client

# Install wordpress cli
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
    chmod +x wp-cli.phar && \
    mv wp-cli.phar /usr/local/bin/wp

# Copy custom.ini
COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini

# Cleanup apt-get install folders
RUN apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*