YAML for Run Docker container

View as Markdown

Run commands inside a Docker container.

YAML parameters for Run Docker container

PARAMETERS
typerequiredstring

Value: RUN_DOCKER_CONTAINER

actionrequiredstring
Unique identifier for the action within the pipeline.
integrationstring
Docker registry integration for authentication. It refers to an integration in the workspace by its identifier, not by its display name.
inline_commandsstring
The commands to execute inside the Docker container. Several commands go in one multi-line string (a | block), one per line - not a YAML list.
entrypointstring
The entrypoint to use for the Docker container.
regionstring
Cloud region for the Docker registry.
working_directorystring
The directory in which the pipeline filesystem will be mounted.
mount_filesystem_disableboolean
If set to true, the filesystem will not be mounted in the container.
volume_mappingsstring[]
The path preceding the colon is the filesystem path (the folder from the filesystem to be mounted in the container). The path after the colon is the container path (the path in the container, where this filesystem will be located).
run_as_userstring
All build commands are run as the default user defined in the selected Docker image. Can be set to another username (on the condition that this user exists in the selected image).
export_container_pathstring
The path in the container to export.
docker_image_namestring
The name of the Docker image.
docker_image_tagstring
The tag of the Docker image.
image_locationstring enum
The location of the image used by the action.
Allowed enum:
PUBLIC_REGISTRY,
PRIVATE_REGISTRY,
ACTION,
ARTIFACT_REGISTRY
docker_registrystring enum
The type of registry from which the image is retrieved.
Allowed enum:
NONE,
DOCKER_HUB,
AMAZON_ECR,
GOOGLE_GCR,
GOOGLE_ARTIFACT_REGISTRY,
OTHER,
GIT_HUB_CONTAINER_REGISTRY,
ARTIFACT_REGISTRY,
DIGITAL_OCEAN_CONTAINER_REGISTRY
use_image_from_actionboolean
If set to true, the image from another action will be used.
docker_build_action_namestring
The name of an action in the same pipeline whose Docker image is used. Set it with image_location: ACTION.
registrystring
The URL of the Docker registry.
loginstring
Username for a registry reached without an integration. A push (repository set) needs an integration or login and password, except for the artifact registry.
passwordstring
Password for login, for a registry reached without an integration.
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
The list of variables for dynamic action execution. The action runs once for each value.
run_only_on_first_failureboolean
When true, the action runs only on the first failure instead of on each failure. Used only when trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds. It cannot exceed the action time limit of the workspace plan; a higher value is rejected.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.

Constraints: ≤ 10

run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Last modified on Nov 2, 2026

YAML examples for Run Docker container

Run Docker container with commands

yaml
- action: "Run container"
  type: "RUN_DOCKER_CONTAINER"
  docker_image_name: "library/ubuntu"
  docker_image_tag: "latest"
  volume_mappings:
    - "/:/buddy/mount/directory"
  inline_commands: "ls -al > ls.log"
  mount_filesystem_disable: false
  working_directory: "/buddy/my-repo-dir"
  export_container_path: "/exportPath"
  entrypoint: "/bin/sh"
  variables:
    - key: "ftp_login"
      value: "userLogin123"
      note: "The name of user to FTP."
    - key: "ftp_password"
      value: "my-ftp-password"
      encrypted: true
      note: "The password for ftp."

Using private image from Docker Hub

yaml
- action: "Run container"
  type: "RUN_DOCKER_CONTAINER"
  docker_image_name: "buddyworks/private_image"
  docker_image_tag: "latest"
  image_location: "PRIVATE_REGISTRY"
  docker_registry: "DOCKER_HUB"
  inline_commands: "ls -al > ls.log"
  mount_filesystem_disable: false
  working_directory: "/buddy/my-repo-dir"
  integration: "my_integration"
  run_as_user: "${user}"
  export_container_path: "/exportPath"
  entrypoint: "/bin/sh"
  variables:
    - key: "user"
      value: "notRoot"
    - key: "top_secret_password"
      value: "my-registry-password"
      encrypted: true

Using image from private registry

yaml
- action: "Run container"
  type: "RUN_DOCKER_CONTAINER"
  docker_image_name: "buddyworks/private_image"
  docker_image_tag: "latest"
  image_location: "PRIVATE_REGISTRY"
  docker_registry: "OTHER"
  entrypoint: "/bin/sh"
  volume_mappings:
    - "/:/buddy/mount/directory"
  inline_commands: "ls -al > ls.log"
  mount_filesystem_disable: false
  working_directory: "/buddy/my-repo-dir"
  login: "buddyworks"
  password: "${top_secret_password}"
  registry: "my.registry.com"

Using image from Google Container Registry

yaml
- action: "Run container"
  type: "RUN_DOCKER_CONTAINER"
  docker_image_name: "tokyo-house-147623/private_image"
  docker_image_tag: "latest"
  image_location: "PRIVATE_REGISTRY"
  docker_registry: "GOOGLE_GCR"
  volume_mappings:
    - "/:/buddy/mount/directory"
  inline_commands: "ls -al > ls.log"
  mount_filesystem_disable: false
  working_directory: "/buddy/my-repo-dir"
  export_container_path: "/exportPath"
  entrypoint: "/bin/sh"
  registry: "my.gcr.com"
  integration: "my_integration"

Using image from Amazon ECR

yaml
- action: "Run container"
  type: "RUN_DOCKER_CONTAINER"
  docker_image_name: "private_image"
  docker_image_tag: "latest"
  image_location: "PRIVATE_REGISTRY"
  docker_registry: "AMAZON_ECR"
  entrypoint: "/bin/sh"
  volume_mappings:
    - "/:/buddy/mount/directory"
  inline_commands: "ls -al > ls.log"
  mount_filesystem_disable: false
  working_directory: "/buddy/my-repo-dir"
  region: "us-east-1"
  integration: "my_integration"

Using image built in previous action

yaml
- action: "Run Docker Container"
  type: "RUN_DOCKER_CONTAINER"
  image_location: "ACTION"
  inline_commands: "ls -al > ls.log"

Minimal Docker container run

yaml
- action: "Run container"
  type: "RUN_DOCKER_CONTAINER"
  docker_image_name: "library/alpine"
  docker_image_tag: "latest"
  inline_commands: "echo 'Hello World'"