<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
nightreaver/python-ssh-mcp/ssh-docker-compose-up
──Details
PublishedOctober 22, 2026 at 02:32 AM
Content Hashsha256:26cd2fa17b8d156a...
Git SHAd998d889fbee
──Files
Files (1 file, 3.2 KB)
SKILL.md3.2 KBactive
SKILL.md · 94 lines · 3.2 KB

version: "1.0.0" description: Bring up a docker-compose project (default detached)


ssh_docker_compose_up

Tier: dangerous | Group: docker | Tags: {dangerous, group:docker}

Runs <compose> -f <file> up [-d] [--build]. Creates networks, volumes, and containers as described by the compose file. Path-confined.

A compose YAML is executed (mounts volumes, declares ports, runs init commands), so its file-path is policy-gated the same way read/write paths are.

Inputs

nametyperequireddefaultnotes
hoststryes--Alias
compose_filestryes--Absolute; in path_allowlist and outside restricted_paths
detachedboolnoTrue-d (don't attach to container output)
buildboolnoFalse--build rebuild images first
timeoutintnoSSH_COMMAND_TIMEOUTRaise for slow builds/pulls
compose_v1boolnoFalseUse legacy docker-compose standalone binary (see below)

Returns

ExecResult.

When to call it

  • First deploy of a project.
  • After editing the compose file.
  • After compose_pull on a shared image update.

When NOT to call it

  • Just restarting existing services -- compose_restart (low-access) is

narrower.

  • No changes have been made and services are already up -- no-op.

Example

python
ssh_docker_compose_up(
host="docker1",
compose_file="/opt/app/docker-compose.yml",
detached=True,
build=False,
timeout=300,
)

Common failures

  • PathNotAllowed -- compose_file outside allowlist.
  • PathRestricted -- compose_file inside a restricted zone (e.g. SMB mount, NFS share).
  • compose file version unsupported -- upgrade docker compose on the host.
  • Long running when pulling/building -- raise the timeout kwarg.

Compose v1 vs v2 (compose_v1 switch)

Two compose implementations coexist in the wild:

  • v2 (default): docker compose up -- subcommand of the docker CLI

plugin. Current upstream, actively maintained.

  • v1: docker-compose up -- separate Python binary, upstream-removed in

2023 but still deployed on older hosts and embedded images.

Default is v2. Pass compose_v1=True when you hit errors like:

  • docker: 'compose' is not a docker command.
  • unknown shorthand flag on flags that v2 supports (v1 is stricter on some

v2-only options).

The switch also applies to podman operators -- SSH_DOCKER_CMD=podman with compose_v1=True yields podman-compose (standalone) instead of podman compose (plugin). Wrappers like sudo docker are preserved: sudo docker + compose_v1=True -> sudo docker-compose.

compose_v1=True overrides SSH_DOCKER_COMPOSE_CMD if set globally -- the per-call switch is the escape hatch when the configured default doesn't fit this particular stack.

Every ssh_docker_compose_* tool accepts the same kwarg with the same semantics. Set it per-call, not per-host, unless you know the host is uniformly v1.

Related

All versions