Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for Cross-Platform Node.js Build Strategies

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

Required Variables

  • [TARGET_ARCH]
  • [SOURCE_ARCH]
  • [NODE_VARIANT]
cross-platform-nodejs-docker-build.txt
Assume the role of a Build Engineer. Create a Dockerfile that supports cross-compilation for Node.js from [SOURCE_ARCH] to [TARGET_ARCH]. Utilize Docker's BUILDPLATFORM and TARGETPLATFORM arguments. Explain how to handle architecture-specific binary fetches for [NODE_VARIANT]. The resulting multi-stage Dockerfile should be able to produce an optimized image for edge devices (ARMv7/v8) starting from an x86_64 CI environment.

Example Output

"The AI generates a Dockerfile using ARG variables that allow a single file to build valid images for multiple CPU architectures."