Skip to content

DockerUbuntu plugin

Use DockerUbuntu when the application command needs an Ubuntu environment in Docker. It runs against a container you already started. Use LocalBash when the command belongs on your host machine.

Select your application collection during onboarding. Use its ID in the target command below.

Install the bundled plugin with reflow init --collection <collection-id>. Docker must be available and running, and the selected container must already be running Ubuntu with Bash, timeout, setsid and ps installed. Your application and its dependencies must be available in that container.

The plugin does not create containers, pull images, change mounts or networks, or stop the selected container. This is local Docker execution, separate from hosted container infrastructure.

Save a private bindings.json, replacing the container name and working directory:

{
"worker": {
"provider": "DockerUbuntu",
"configuration": {"container": "my-test-container", "cwd": "/workspace/app"}
}
}

Both container and the absolute container cwd are required. Optional dockerPath selects the Docker executable; otherwise the plugin uses docker on PATH. Keep the bindings file out of Git.

Terminal window
chmod 600 /absolute/path/to/bindings.json
reflow target --group container-tests --collection <collection-id> --bindings /absolute/path/to/bindings.json

Copy this into /tmp/container-output.md, outside your checkout:

---
name: Capture container output
providers:
worker: DockerUbuntu
---
### Capture container output
```rfl
worker.bash command="printf 'container ready\n'" checkpoint="container-output"
```

Create the test in the team’s chosen location, then run it:

Terminal window
reflow flows create --name container-output --file /tmp/container-output.md
reflow plan container-output
reflow apply container-output
reflow dashboard

Replace the example command with your application’s test or worker command. The alias worker selects the private connection with the same name. Its working directory is inside the container; the host checkout is separate.

worker.bash takes a required command string and optional files string containing a JSON array of relative paths. These are the same arguments as LocalBash. checkpoint names the retained result.

worker.bash command="./bin/check-orders > report.txt" files="[\"report.txt\"]" checkpoint="order-report"

This example assumes your container contains the application’s ./bin/check-orders. Files are read from the container after the command. They must remain inside the configured directory, and each is limited to 4 MiB.

Write $${ for a literal ${ in the quoted command string: author $${VAR:-default}, $${PIPESTATUS[0]} or $${#arr[@]}, and Bash in the container receives ${VAR:-default}, ${PIPESTATUS[0]} or ${#arr[@]} respectively. RFL references such as ${inputs.name} still resolve normally. This is the same interpolation escape as LocalBash; JSON string escaping and shell quoting still apply.

Each invocation retains stdout, stderr, exit code and selected files. A nonzero exit fails the command and keeps its output. Compare retained results across runs; there is no extra terminal screenshot command.

Shared shell evidence redacts known private values from text and withholds affected binary files. Files in the container remain unchanged.

An unavailable Docker daemon, stopped container, missing working directory or missing required executable prevents execution. Reflow manages the command’s process group while leaving the selected container running. If completion is unknown, reconcile it before retrying; see repair and rerun.

Flows using this plugin can be saved in Reflow or in your repository. Read test storage for the team preference, private bindings and the shared plan/apply workflow.