Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for BuildKit Cache Mounts in Node.js

Use this engineered prompt to drastically optimize your workflow and output.

Required Variables

  • [NPM_CACHE_PATH]
  • [BUILD_PLATFORM]
  • [NODE_MODULES_STRATEGY]
buildkit-cache-mounts-node-optimization.txt
Act as a CI/CD Lead. Write an advanced Dockerfile that utilizes Docker BuildKit's '--mount=type=cache' features for [PACKAGE_MANAGER]. Configure it so that [NPM_CACHE_PATH] is persisted across builds to speed up dependency installation on [BUILD_PLATFORM]. Show how to implement this alongside a multi-stage build to ensure the cache does not bloat the final image. Detail the specific syntax for the RUN instructions to maximize cache hits.

Example Output

"The output features a cutting-edge Dockerfile that slashes CI build times by up to 80% through intelligent BuildKit mounting."