proxitok/Dockerfile

26 lines
742 B
Docker
Raw Normal View History

FROM php:8-apache
2022-03-15 17:52:54 -04:00
WORKDIR /var/www/html
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN apt update -y && apt upgrade -y \
&& apt install -y --no-install-recommends libzip-dev \
2022-03-15 17:52:54 -04:00
&& pecl install redis zip \
&& docker-php-ext-enable redis zip \
&& a2enmod rewrite headers \
&& mkdir /cache \
&& chown -R www-data:www-data /cache \
&& rm -rf /var/www/html/*
2022-03-15 17:52:54 -04:00
# Copy project to /var/www/html
2022-03-15 17:52:54 -04:00
COPY . .
# Run composer and clean
2022-03-18 10:02:26 -04:00
RUN composer update --no-cache \
&& composer install --no-interaction --optimize-autoloader --no-dev --no-cache \
&& apt autoclean -y \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/bin/composer
EXPOSE 80
CMD apachectl -D FOREGROUND