Portal Community
  About Docker volumes: Docker volumes provide persistent storage that survives container restarts and removal. Volumes are managed by Docker, not the host filesystem — they are stored in /var/lib/docker/volumes/ by default. If a volume with the given name already exists, Docker returns the existing volume without error — making this operation idempotent.

When to Use

Configuration

Connection

FieldTypeDefaultDescription
dockerHoststringunix:///var/run/docker.sockDocker daemon socket path or TCP endpoint.
connectionTypestringunixsocketOne of: unixsocket, tcp, tcptls.
tlsCertPathstringTLS certificate directory. Required for tcptls. optional
timeoutSecondsint30Operation timeout. optional

Operation Fields

FieldTypeBadgeDescription
NamestringoptionalVolume name. If omitted, Docker generates a random hex name. Always provide a meaningful name in production workflows.
DriverstringoptionalVolume driver to use (e.g., local, nfs, convoy). Defaults to local.
LabelsstringoptionalJSON object of key-value label pairs to apply to the volume (e.g., {"tenant_id":"0042","env":"prod"}).

Sample Configuration

{
  "resource": "volume",
  "operation": "create",
  "connection": {
    "dockerHost": "unix:///var/run/docker.sock",
    "connectionType": "unixsocket"
  },
  "Name": "db-tenant-{{ $vars.tenantId }}",
  "Driver": "local",
  "Labels": "{\"tenant_id\":\"{{ $vars.tenantId }}\",\"created_by\":\"provisioning-workflow\",\"env\":\"prod\"}"
}

Validation Errors

Error CodeConditionResolution
CONFIG_ERRORConnection settings malformed.Check dockerHost and connectionType.
DOCKER_API_ERRORInvalid volume name (contains illegal characters) or driver not installed.Use only alphanumeric characters, hyphens, and underscores in volume names. Ensure the driver plugin is installed.
AUTH_FAILEDTLS handshake failed.Verify tlsCertPath contains valid certificates.

Output

Success Port

FieldTypeDescription
statusstring"ok" on success (also returned if volume already exists).
resourcestring"volume"
operationstring"create"
volumeInfo.NamestringVolume name (generated or provided).
volumeInfo.DriverstringDriver used for this volume.
volumeInfo.MountpointstringHost filesystem path of the volume data directory.
volumeInfo.CreatedAtstringISO 8601 creation timestamp.

Error Port

Fires when volume creation fails. Output contains status: "error", errorCode, and errorMessage.

Sample Output

{
  "status": "ok",
  "resource": "volume",
  "operation": "create",
  "volumeInfo": {
    "Name": "db-tenant-0042",
    "Driver": "local",
    "Mountpoint": "/var/lib/docker/volumes/db-tenant-0042/_data",
    "CreatedAt": "2026-05-26T09:15:00Z"
  }
}

Expression Reference

ExpressionReturns
{{ $output.volumeInfo.Name }}The volume name — pass to container/create for the mount binding.
{{ $output.volumeInfo.Mountpoint }}Host path — use for external backup job targeting.
{{ $output.volumeInfo.CreatedAt }}Creation timestamp — store in tenant record for audit purposes.

Node Policies & GuardRails

PolicyEnforcement
Never expose Docker daemon TCP without TLSUse tcptls for remote connections. Plain tcp is blocked in production GuardRail profiles.
Store TLS certificates in Credentials ManagerReference tlsCertPath via {{ $credentials.dockerTlsCertPath }}.
Always name volumes in production workflowsAuto-generated names create operational blind spots. Provide a meaningful Name in all production volume/create calls.
Apply labels for metadata trackingUse Labels to store tenant ID, environment, and workflow origin — this enables targeted backup and cleanup operations.
Never remove volumes without confirming backupVolume data is permanently deleted on removal. Downstream volume/remove nodes must only fire after backup confirmation.
Restrict container/exec to approved commandsArbitrary exec access is root-equivalent. GuardRail exec policies restrict allowed command prefixes.

Examples

Example 1 — Tenant Provisioning Workflow

When a new tenant is onboarded, create a dedicated database volume named with the tenant ID, then create and start the tenant's database container mounting that volume.

// Step 1 — volume/create
{
  "resource": "volume",
  "operation": "create",
  "Name": "db-tenant-{{ $trigger.tenantId }}",
  "Labels": "{\"tenant_id\":\"{{ $trigger.tenantId }}\",\"env\":\"prod\"}"
}

// Step 2 — container/create
{
  "resource": "container",
  "operation": "create",
  "Image": "postgres:16",
  "Name": "db-{{ $trigger.tenantId }}",
  "Volumes": "{{ $node['volume-create'].output.volumeInfo.Name }}:/var/lib/postgresql/data"
}

Example 2 — Idempotent Pre-Deploy Setup

In a deployment workflow, always attempt to create the required volumes. Since volume creation is idempotent (returns existing volume if already present), this step is safe to re-run.

// These three volume/create nodes can run in parallel:
{ "Name": "app-uploads", "Driver": "local" }
{ "Name": "app-config",  "Driver": "local" }
{ "Name": "app-cache",   "Driver": "local" }

// Then proceed to container/create only after all three succeed.

Example 3 — NFS-Backed Shared Volume

Create a volume backed by an NFS mount for shared storage across multiple containers on the same host.

{
  "resource": "volume",
  "operation": "create",
  "Name": "shared-assets",
  "Driver": "local",
  "Labels": "{\"type\":\"nfs-backed\",\"nfs_server\":\"nfs.internal\"}"
}