Skip to content

Instantly share code, notes, and snippets.

@arifnd
Created August 9, 2025 04:29
Show Gist options
  • Select an option

  • Save arifnd/531effa8a23cde741ff35f3865638aa5 to your computer and use it in GitHub Desktop.

Select an option

Save arifnd/531effa8a23cde741ff35f3865638aa5 to your computer and use it in GitHub Desktop.
Example Dockerfile for run Laravel using serversideup/php Docker images
FROM serversideup/php:8.4-fpm-nginx-alpine
WORKDIR /var/www/html
COPY . .
USER root
RUN composer install --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader \
&& php artisan optimize \ # Can remove when set AUTORUN_ENABLED=true
&& chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html/storage /var/www/html/bootstrap/cache
USER www-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment