context_create
Create a named Docker CLI context to point at a daemon endpoint, with optional TLS verification settings.
Instructions
Create a new Docker CLI context pointing at a daemon endpoint.
Registers a named endpoint for the CLI; switch with context_use, enumerate with
context_list. It does not retarget this server's docker-py client (pinned at startup).
Does not raise on a non-zero CLI exit — inspect returncode/stderr in the result. It does
raise ValueError before running anything if docker_host or a TLS path contains a comma, which
would inject extra keys (including skip-tls-verify) into the endpoint spec.
args:
name - Name for the new context (must not already exist)
docker_host - Daemon URL, e.g. "tcp://10.0.0.5:2376" or "unix:///var/run/docker.sock"; no commas
description - Optional human description shown in context ls
tls_ca - Path on the local host to the CA cert (for TLS daemons); no commas
tls_cert - Path on the local host to the client cert; no commas
tls_key - Path on the local host to the client key; no commas
skip_tls_verify - Disable TLS verification (insecure; for testing only). The only way to set
it: it cannot be smuggled through docker_host
returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| tls_ca | No | ||
| tls_key | No | ||
| tls_cert | No | ||
| description | No | ||
| docker_host | Yes | ||
| skip_tls_verify | No |