Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for Python Alpine with Native C-Extensions

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

Required Variables

  • [GCC_VERSION]
  • [LIBS_TO_INSTALL]
  • [CLEANUP_COMMAND]
  • [PYTHON_VERSION]
python-alpine-native-c-extensions.txt
Act as a Systems Engineer. Solve the common 'Alpine Python size' issue. Create a Dockerfile for [PYTHON_VERSION] Alpine that installs [GCC_VERSION] and [LIBS_TO_INSTALL] only for the build stage. Use multi-stage builds to ensure that the final runtime image does not contain the build-base or headers. Implement a strategy to identify and copy only the required shared object (.so) files or use virtual packages that are removed with [CLEANUP_COMMAND] after the wheel is built.

Example Output

"The AI produces a Dockerfile that overcomes Alpine's glibc compatibility issues while keeping the final footprint minimal."