Last active
February 8, 2021 18:20
-
-
Save zerojame/3fe60cd2170f283ea2c020a1e034e7e2 to your computer and use it in GitHub Desktop.
Laravel Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM bkuhl/laravel-fpm-nginx:8 | |
# Add default virtualhost | |
# Still needs work | |
COPY default.conf /etc/nginx/conf.d/default.conf | |
COPY upload.ini /usr/local/etc/php/conf.d/upload.ini | |
WORKDIR /var/www/html | |
# Copy the application files to the container | |
ADD --chown=www-data:www-data . /var/www/html | |
USER www-data | |
# install dependencies | |
RUN composer install --no-interaction --optimize-autoloader --prefer-dist \ | |
# keep the container light weight | |
&& rm -rf /home/www-data/.composer/cache | |
RUN composer dump-autoload | |
USER root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment