Skip to content

Instantly share code, notes, and snippets.

@Thainainan03
Last active February 8, 2021 18:20
Show Gist options
  • Save Thainainan03/3fe60cd2170f283ea2c020a1e034e7e2 to your computer and use it in GitHub Desktop.
Save Thainainan03/3fe60cd2170f283ea2c020a1e034e7e2 to your computer and use it in GitHub Desktop.
Laravel Dockerfile
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