Build Docker Image (Local Platform)

VerifiedSafe

Build a single Docker image for the current platform. Use this for quick local testing and development. It is the fastest way to build and test images locally, as it avoids multi-platform overhead.

Sby Skills Guide Bot
DevelopmentBeginner
1006/2/2026
Claude Code
#docker#build#image#local

Recommended for

Our review

Builds a Docker image for the local platform using predefined recipes.

Strengths

  • Guided process with image and tag selection
  • Automatic prerequisite checks (Docker, dependencies)
  • Clear success/failure messages with actionable steps

Limitations

  • Only supports images listed in the menu
  • Builds only for the local platform (not multi-arch)
  • Does not push the image to any registry
When to use it

Use this skill to quickly build a predefined Docker image locally during development or local testing.

When not to use it

Avoid this skill when you need to build for multiple architectures, push to a registry, or use a custom image not in the list.

Security analysis

Safe
Quality score90/100

The skill builds Docker images from a fixed set of predefined local directories. It does not execute external scripts, exfiltrate data, or perform destructive actions. The only potential risk is from the Dockerfiles themselves, but they are intended to be trusted local files.

No concerns found

Examples

Build netshoot with local tag
/build
Select netshoot
Select tag: local
Build node with master-head tag
/build
Select node
Select tag: custom
Enter custom tag: master-head

Build Docker Image (Local Platform)

Description

Build a single Docker image for the current platform. This is the fastest way to build and test images locally.

Instructions

Follow these steps to build a Docker image:

1. Gather Required Information

Use the AskUserQuestion tool to prompt the user for:

Question 1: Which image to build?

  • Header: "Image"
  • Options:
    • bookworm: "Base Debian Bookworm image with Docker client and common utilities"
    • go-operator: "Go 1.25 development environment for Kubernetes operators with tools like controller-gen, ginkgo, helm, kind, and golangci-lint"
    • netshoot: "Network troubleshooting container with comprehensive networking tools (tcpdump, wireshark, iperf, nmap, etc.)"
    • node: "Node.js v20.18.3 development environment built on top of bookworm base"
    • server-base: "SUSE BCI base image with tini, curl, and NFS client"

Question 2: What tag to use?

  • Header: "Tag"
  • Options:
    • local: "Tag as 'local' for quick local testing (Recommended)"
    • latest: "Tag as 'latest'"
    • custom: "Specify a custom tag"

If the user selects "custom", ask them to provide the custom tag name in the "Other" field.

2. Validate Prerequisites

Before building, check:

  1. Docker is running:

    docker info
    

    If this fails, inform the user that Docker is not running and they need to start Docker Desktop or the Docker daemon.

  2. Image directory exists: Verify that the directory for the selected image exists (e.g., bookworm/, netshoot/, etc.)

  3. Handle node dependency: If the user selected "node", check if the bookworm:master-head image exists:

    docker images futuretea/bookworm:master-head --format "{{.Repository}}:{{.Tag}}"
    

    If it doesn't exist, warn the user:

    "⚠️ The node image depends on futuretea/bookworm:master-head, which doesn't exist locally. You should build bookworm first with tag 'master-head', or this build will fail."

    Ask if they want to continue anyway or build bookworm first.

3. Build the Image

Execute the docker build command:

docker build -t futuretea/<image-name>:<tag> <image-name>/

Replace <image-name> with the selected image and <tag> with the selected/custom tag.

4. Report Results

After the build completes:

On Success:

✅ Successfully built futuretea/<image-name>:<tag>

You can now run the image with:
docker run -it futuretea/<image-name>:<tag>

To see the image details:
docker images futuretea/<image-name>:<tag>

On Failure:

❌ Build failed for futuretea/<image-name>:<tag>

Common issues:
- Check the Dockerfile syntax in <image-name>/Dockerfile
- Ensure base images are available
- Check Docker daemon logs for more details

Example Usage

User: /build
Claude: [Prompts for image selection]
User: [Selects netshoot]
Claude: [Prompts for tag]
User: [Selects "local"]
Claude: [Runs docker build -t futuretea/netshoot:local netshoot/]
Claude: ✅ Successfully built futuretea/netshoot:local

Notes

  • This skill only builds for the current platform (typically linux/amd64 on most development machines)
  • For multi-platform builds, use the /build-multiplatform skill instead
  • The build output will show all Docker build steps and any errors
  • Built images are stored locally and not pushed to any registry
Related skills