master/php-fpm/Dockerfile

37 lines
2.2 KiB
Docker

# ***********************************************************************************************************************************
# * ___, _ ____ , __ *
# * / | o | | (| \ /|/ \ | *
# * | | ,_ ,_ __, | | | | _ _ __, ,_ _|_ ,_ _ | __/ __ __, ,_ __| *
# * | | / | / | | | |_/ | |/ _| ||/ |/ \_/ | / | | | | / | |/ | \/ \_/ | / | / | *
# * \__/\_/ |_/ |_/|_/ \/ \_/|_/|__/ (/\___/ |__/|__/ \_/|_/ |_/|_/ \_/|_/ |_/|__/ |(__/\__/ \_/|_/ |_/\_/|_/ *
# * /| *
# * \| *
# * *
# ***********************************************************************************************************************************
ARG PHP_VERSION
FROM php:${PHP_VERSION}
# Set timezone
RUN apk add --no-cache tzdata
ENV TZ=Etc/UTC
# Install PHP config
RUN mv /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
COPY etc/php /usr/local/etc/php/conf.d
# Install dependencies
RUN apk update && \
apk upgrade && \
apk add git && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
rm -rf /var/cache/apk/*
# Install and execute own entrypoint script. This scrpit should hold all instructions that are not
# executed while the image is build (use RUN in this file therefore) but that are run when the
# container starts up. One major advanatge is that mounted volumes are already available when this
# script is executed.
COPY entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]