diff --git a/Dockerfile b/Dockerfile index e761cb2..c06a2fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,12 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* # Get latest Composer COPY --from=docker.io/library/composer:latest /usr/bin/composer /usr/bin/composer -# Copy application files -COPY --chown=www-data:www-data . /var/www +# Copy application files and fix permissions +COPY . /var/www +RUN chown -R www-data:www-data /var/www && \ + find /var/www -type d -exec chmod 755 {} + && \ + find /var/www -type f -exec chmod 644 {} + && \ + rm -rf /var/www/.circleci /var/www/.github # Change current user to www USER www-data @@ -36,4 +40,4 @@ USER www-data # Expose port 8000 EXPOSE 8000 -CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"] +CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"] \ No newline at end of file