Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM composer:latest AS composer
- # continue with the official PHP image
- FROM php:7.2-fpm-stretch
- RUN apt-get update && apt-get install -y
- supervisor
- nginx
- zip
- RUN docker-php-ext-install pdo pdo_mysql
- ADD docker/nginx.conf /etc/nginx/nginx.conf
- ADD docker/virtualhost.conf /etc/nginx/conf.d/default.conf
- ADD docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
- COPY --chown=root:www-data . /var/www/html/app
- # copy the Composer PHAR from the Composer image into the PHP image
- COPY --from=composer /usr/bin/composer /usr/bin/composer
- WORKDIR /var/www/html/app
- COPY ./.env.local .env
- RUN chmod -R g+w /var/www/html/app/storage
- RUN chmod -R g+w /var/www/html/app/bootstrap
- RUN composer install
- RUN php artisan key:generate
- EXPOSE 80
- CMD ["/usr/bin/supervisord"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement