From 2aca0010dc4a0e4f9cb0c14b04dd2077859e2e84 Mon Sep 17 00:00:00 2001 From: Mischa Spelt Date: Mon, 24 Aug 2026 11:11:04 +0200 Subject: [PATCH] Dockerfile: Make sure the storage and cache directories exist and are writeable before running composer install --- Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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