Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Security-Hardened Distroless Python Builds
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[PYTHON_APP_TYPE] - ✦
[REQUIREMENTS_FILE] - ✦
[EXPOSED_PORT] - ✦
[ENV_VARS]
security-hardened-python-distroless.txt
As a Cyber Security Specialist, draft a Dockerfile for a [PYTHON_APP_TYPE] using Google's Distroless image. Start with a standard Python build image to compile dependencies from [REQUIREMENTS_FILE]. Ensure all library paths are correctly mapped. In the final stage, copy the binaries to 'gcr.io/distroless/python3'. Incorporate [ENV_VARS] into the build process safely. Explain why Distroless is superior for this [PYTHON_APP_TYPE] and how it mitigates shell-based exploits.
Example Output
"A production-ready Dockerfile that lacks a shell and package manager, making it nearly impossible for attackers to execute lateral movement scripts."