fetch_dockerfile
Retrieve Dockerfile content to analyze image composition, identify dependencies, and understand build processes for security auditing or learning purposes.
Instructions
Fetch the actual Dockerfile used to build a Docker image.
USE THIS WHEN: You need to see exactly how an image is built (base image, installed packages, configuration).
BEST FOR: Understanding image composition, security analysis, or learning how to build similar images.
Attempts to find Dockerfile link in DockerHub description and fetches from source (usually GitHub).
Useful for:
- Seeing what base image is used
- Identifying installed packages and dependencies
- Understanding build process and optimizations
- Security auditing (what's included in the image)
- Learning Dockerfile best practices from official images
Note: Not all images have publicly accessible Dockerfiles. Many official images do.
Args:
image: Docker image name (e.g., "nginx", "python", "postgres")
Returns:
JSON with Dockerfile content, source URL, and metadata (or error if not found)
Example: fetch_dockerfile("nginx") → Returns Dockerfile from nginx GitHub repository
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes |