Skill v1.0.0
currentLLM-judged scan90/100version: "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
| name | type | required | default | notes | |
|---|---|---|---|---|---|
host | str | yes | -- | Alias | |
compose_file | str | yes | -- | Absolute; in path_allowlist and outside restricted_paths | |
detached | bool | no | True | -d (don't attach to container output) | |
build | bool | no | False | --build rebuild images first | |
timeout | int | no | SSH_COMMAND_TIMEOUT | Raise for slow builds/pulls | |
compose_v1 | bool | no | False | Use 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_pullon 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
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
timeoutkwarg.
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 flagon 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.