generate_dockerfile
Generates hardened multi-stage Dockerfiles from a service name, version, and build family so users can create container images aligned with the 15 GWShield pillars.
Instructions
Generate a hardened Dockerfile following all 15 GWShield pillars
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"serviceName": "<serviceName>",
"serviceVersion": "<serviceVersion>",
"family": "<family>"
},
"name": "generate_dockerfile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| family | Yes | Image build family | |
| profile | No | Image profile variant | standard |
| volumes | No | Volume mount points (e.g., ["/data"]) | |
| sourceUrl | No | URL to download the source tarball | |
| description | No | Image description for OCI labels | |
| exposePorts | No | Ports to expose (e.g., [6379]) | |
| runtimeDirs | No | Runtime directories to create (e.g., ["/data", "/var/log/redis"]) | |
| serviceName | Yes | Service name (e.g., 'redis', 'traefik') | |
| sourceFiles | No | F-5: Explicit source files/dirs to COPY (go-static, rust-static only). Generates a layer-caching pattern (manifests first, then source). Omit for c-musl/c-glibc — those families build from tarball in-container. Example for Go: ['go.mod', 'go.sum', 'main.go', 'pkg/', 'internal/'] | |
| extraBuildDeps | No | Additional Alpine build dependencies | |
| serviceVersion | Yes | Service version (e.g., 'v7.4.8', 'v3.6.9') |