Dockerfile: Make sure the storage and cache directories exist and are writeable before running composer install
Build and Deploy / build (push) Failing after 1m29s
Build and Deploy / build (push) Failing after 1m29s
This commit is contained in:
+7
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user