Rework dockerfile to final form
This commit is contained in:
parent
a624faa728
commit
4a81718818
22
Dockerfile
22
Dockerfile
@ -1,7 +1,5 @@
|
|||||||
FROM php:8.2-apache
|
FROM php:8.2-apache
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt upgrade -y && \
|
apt upgrade -y && \
|
||||||
apt install -y \
|
apt install -y \
|
||||||
@ -37,16 +35,20 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&
|
|||||||
RUN curl -sS https://get.symfony.com/cli/installer | bash && \
|
RUN curl -sS https://get.symfony.com/cli/installer | bash && \
|
||||||
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
|
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
|
||||||
|
|
||||||
COPY 000-default.conf /etc/apache2/sites-available/
|
|
||||||
|
|
||||||
COPY composer.lock composer.json /var/www/html/
|
|
||||||
|
|
||||||
RUN composer install --no-scripts --no-dev --optimize-autoloader
|
|
||||||
|
|
||||||
COPY . /var/www/html/
|
COPY . /var/www/html/
|
||||||
RUN rm /var/www/html/.env*
|
|
||||||
|
|
||||||
RUN cp /var/www/html/data/data.db /var/www/html/var/
|
RUN mv 000-default.conf /etc/apache2/sites-available/
|
||||||
|
RUN rm /var/www/html/.env*
|
||||||
|
RUN rm -rf /var/www/html/var/*
|
||||||
|
RUN rm -rf /var/www/html/vendor
|
||||||
|
RUN rm -rf /var/www/html/tests
|
||||||
|
RUN rm -rf /var/www/html/translations
|
||||||
|
|
||||||
|
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install --no-scripts --no-dev --optimize-autoloader
|
||||||
|
RUN mv /var/www/html/data/data.db /var/www/html/var/
|
||||||
|
|
||||||
|
RUN mkdir /var/www/html/var/cache
|
||||||
|
RUN mkdir /var/www/html/var/log
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /var/www/html
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
RUN chmod -R 755 /var/www/html
|
RUN chmod -R 755 /var/www/html
|
Loading…
Reference in New Issue
Block a user