feat(docker): optimize copy command to modify perms
The previous chown command is no longer needed, resulting in significant time savings.
This commit is contained in:
parent
f8e0ef5cfa
commit
aee7e505bc
@ -19,13 +19,12 @@ RUN apt-get install -y nodejs
|
|||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
COPY . .
|
COPY --chown=www-data:www-data . .
|
||||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
RUN composer update && composer install
|
RUN composer update && composer install
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
# Set Laravel's permissions and setup storage, though this could be done in the COPY command directly
|
|
||||||
RUN chown -R www-data:www-data .
|
|
||||||
RUN chmod -R 755 /var/www/html/storage
|
RUN chmod -R 755 /var/www/html/storage
|
||||||
RUN php artisan storage:link
|
RUN php artisan storage:link
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user