Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Automated Dockerfile Vulnerability Patching
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[BASE_OS_IMAGE] - ✦
[SCANNER_TOOL] - ✦
[NODE_OR_PYTHON] - ✦
[PATCH_COMMAND]
automated-docker-vulnerability-patching.txt
Act as a Security Automation Expert. Design a Dockerfile for a [NODE_OR_PYTHON] application that uses [BASE_OS_IMAGE]. Integrate a step that runs [PATCH_COMMAND] to update system packages and mitigate known CVEs discovered by [SCANNER_TOOL]. Use a multi-stage approach to ensure the final image is clean. Include metadata labels for OCI compliance and versioning. Explain the importance of layer ordering in vulnerability mitigation.
Example Output
"A security-first Dockerfile that automatically patches its base OS layers during the build process to maintain high compliance scores."