todo/PHP.Dockerfile

20 lines
591 B
Docker
Raw Normal View History

2022-05-02 10:44:29 +00:00
FROM php:7.4-apache
2022-05-02 10:14:58 +00:00
RUN apt-get update
RUN apt-get install -y git zip
2022-05-02 10:44:29 +00:00
# Set Apache Root
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Enable Some Apache Mod
RUN a2enmod rewrite headers
2022-05-02 10:14:58 +00:00
RUN docker-php-ext-install pdo pdo_mysql
2022-05-02 10:44:29 +00:00
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
2022-05-02 10:14:58 +00:00
# Composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer