Back to Coolify

Add BuildKit cache mounts to Dockerfile

backlog/tasks/task-00001.01 - Add-BuildKit-cache-mounts-to-Dockerfile.md

3.12.37580 B
Original Source

Description

Modify the production Dockerfile to include BuildKit cache mounts for Composer and NPM dependencies to speed up subsequent builds by reusing cached dependency installations

Acceptance Criteria

<!-- AC:BEGIN -->
  • #1 Cache mount for Composer dependencies is added at line 30 with --mount=type=cache target=/var/www/.composer/cache,Cache mount for NPM dependencies is added at line 41 with --mount=type=cache target=/root/.npm,Dockerfile syntax remains valid and builds successfully,All existing functionality is preserved with no regressions
<!-- AC:END -->