File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM php:8.1.18 -apache
1+ FROM php:8.1-apache
22
33RUN apt-get update && apt-get install -y git
44
5+ COPY ./app /var/www/html
6+
57ENV APACHE_DOCUMENT_ROOT /var/www/html/public
68
79RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
810RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
911
1012# Install Composer
11- RUN curl -sS https://getcomposer.org/installer | php -- --check && \
12- export COMPOSER_MEMORY_LIMIT=-1 && \
13- composer self-update --1 && \
14- composer install --no-interaction --optimize-autoloader
13+ COPY --from=composer /usr/bin/composer /usr/bin/composer
14+ RUN alias composer='php /usr/bin/composer'
15+
16+ WORKDIR /var/www/html
17+ RUN composer update && composer install
1518
16- RUN a2enmod rewrite && service apache2 restart
19+ RUN a2enmod rewrite && service apache2 restart
Original file line number Diff line number Diff line change 11version : ' 3.1'
22services :
33 httpd :
4- image : php:8.1.18-apache
5- volumes :
6- - ./app:/var/www/html
74 ports :
85 - 8080:80
96 build : .
You can’t perform that action at this time.
0 commit comments