docker_build
Create Docker images by building from a Dockerfile, specifying context, tags, build arguments, and platform options. Supports multi-stage builds, cache control, and base image updates.
Instructions
Build a Docker image from a Dockerfile
Input Schema
Name | Required | Description | Default |
---|---|---|---|
build_args | No | Build arguments as key-value pairs | |
context | No | Build context path (default: current directory) | |
dockerfile | No | Path to Dockerfile (relative to context) | |
no_cache | No | Do not use cache when building | |
platform | No | Target platform (e.g., linux/amd64, linux/arm64) | |
pull | No | Always attempt to pull newer version of base image | |
tag | No | Tag for the built image (e.g., myapp:latest) | |
target | No | Target stage for multi-stage builds |
Input Schema (JSON Schema)
{
"properties": {
"build_args": {
"description": "Build arguments as key-value pairs",
"type": "object"
},
"context": {
"description": "Build context path (default: current directory)",
"type": "string"
},
"dockerfile": {
"description": "Path to Dockerfile (relative to context)",
"type": "string"
},
"no_cache": {
"description": "Do not use cache when building",
"type": "boolean"
},
"platform": {
"description": "Target platform (e.g., linux/amd64, linux/arm64)",
"type": "string"
},
"pull": {
"description": "Always attempt to pull newer version of base image",
"type": "boolean"
},
"tag": {
"description": "Tag for the built image (e.g., myapp:latest)",
"type": "string"
},
"target": {
"description": "Target stage for multi-stage builds",
"type": "string"
}
},
"type": "object"
}