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 DockerUbuntu. 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
plugins:
- name: DockerUbuntu
sourceCommit: 5852a91f8ba9f4c73585a5984a96117a159c068f
descriptorDigest: 06efccfc6c65e2044cadf2d492a2fc25a3bf5bd22276785e784252c90cebf88f
---
### 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; the working directory is inside the container, not the host checkout.

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.

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.

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.