work on dockerfile
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM php:8-apache
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV DATABASE_URL=localhost
|
||||
|
||||
# Apk install
|
||||
RUN apt update -y && apt install zip wget -y
|
||||
|
||||
# Install pdo
|
||||
RUN docker-php-ext-install pdo_mysql
|
||||
|
||||
# Install composer
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php && php -r "unlink('composer-setup.php');" && mv composer.phar /usr/local/bin/composer
|
||||
RUN composer install -n --no-scripts
|
||||
RUN chown -R www-data:www-data /var/www/html/var
|
||||
|
||||
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
|
||||
|
||||
RUN chmod +x start.sh
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
ENTRYPOINT ["./start.sh"]
|
||||
Reference in New Issue
Block a user