diff --git a/Dockerfile b/Dockerfile index e46c8cbc..ed1f15a8 100755 --- a/Dockerfile +++ b/Dockerfile @@ -48,12 +48,7 @@ COPY composer.json composer.lock ./ # Note: for Laravel, the COPY . . needs to be before the composer install COPY . . -RUN composer install \ - --no-dev \ - --prefer-dist \ - --no-interaction \ - --optimize-autoloader - +# Make sure the storage and cache directories exist and are writeable before running composer install RUN mkdir -p \ storage/app \ storage/framework/cache/data \ @@ -64,4 +59,10 @@ RUN mkdir -p \ && chown -R www-data:www-data storage bootstrap/cache \ && chmod -R ug+rwX storage bootstrap/cache +RUN composer install \ + --no-dev \ + --prefer-dist \ + --no-interaction \ + --optimize-autoloader + EXPOSE 80