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
|
# Note: for Laravel, the COPY . . needs to be before the composer install
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN composer install \
|
# Make sure the storage and cache directories exist and are writeable before running composer install
|
||||||
--no-dev \
|
|
||||||
--prefer-dist \
|
|
||||||
--no-interaction \
|
|
||||||
--optimize-autoloader
|
|
||||||
|
|
||||||
RUN mkdir -p \
|
RUN mkdir -p \
|
||||||
storage/app \
|
storage/app \
|
||||||
storage/framework/cache/data \
|
storage/framework/cache/data \
|
||||||
@@ -64,4 +59,10 @@ RUN mkdir -p \
|
|||||||
&& chown -R www-data:www-data storage bootstrap/cache \
|
&& chown -R www-data:www-data storage bootstrap/cache \
|
||||||
&& chmod -R ug+rwX storage bootstrap/cache
|
&& chmod -R ug+rwX storage bootstrap/cache
|
||||||
|
|
||||||
|
RUN composer install \
|
||||||
|
--no-dev \
|
||||||
|
--prefer-dist \
|
||||||
|
--no-interaction \
|
||||||
|
--optimize-autoloader
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
Reference in New Issue
Block a user