context_create
Create a Docker CLI context for a daemon endpoint, registering a named connection to switch and list contexts while preserving the server's client configuration.
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.
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"
description - Optional human description shown in context ls
tls_ca - Path on the local host to the CA cert (for TLS daemons)
tls_cert - Path on the local host to the client cert
tls_key - Path on the local host to the client key
skip_tls_verify - Disable TLS verification (insecure; for testing only)
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 |