Knowledge

Run docker container

Parameters
Name Description
action Required String The ID of the action.
type Required String The type of the action. Should be set to RUN_DOCKER_CONTAINER.
docker_image_name Required String The name of the Docker image.
docker_image_tag Required String The tag of the Docker image.
inline_commands Required String The commands that will be executed.
mount_filesystem_disable Boolean Defines whether or not to mount the filesystem to the running container.
mount_filesystem_path String The directory in which the pipeline filesystem will be mounted.
trigger_time String Specifies when the action should be executed. Can be one of ON_EVERY_EXECUTION, ON_FAILURE or ON_BACK_TO_SUCCESS.
login String The username required to connect to the Dockerhub, private registry or GCR.
password String The password required to connect to the Dockerhub, private registry or GCR.
registry String The url to the Docker registry or GCR.
integration_id Integration The integration. Required for using the image from the Amazon ECR.
region String The name of the Amazon S3 region. Required for using the image from the Amazon ECR. The full list of regions is available here.
trigger_condition String Defines when the build action should be run. Can be one of ALWAYS, ON_CHANGE or ON_CHANGE_AT_PATH.
trigger_condition_paths String[] Required when trigger_condition is set to ON_CHANGE_AT_PATH.
Example
actions:
  - action: "Run container"
    type: "RUN_DOCKER_CONTAINER"
    docker_image_name: "library/ubuntu"
    docker_image_tag: "latest"
    inline_commands: "ls -al > ls.log"
    trigger_condition: "ON_CHANGE_AT_PATH"
    trigger_condition_paths: 
    - "/src"
    - "/tests"
    mount_filesystem_disable: false
    working_directory: "/buddy/my-repo-dir"
Example
Using private image from Dockerhub
actions:
  - action: "Run container"
    type: "RUN_DOCKER_CONTAINER"
    docker_image_name: "buddyworks/private_image"
    docker_image_tag: "latest"
    inline_commands: "ls -al > ls.log"
    mount_filesystem_disable: false
    working_directory: "/buddy/my-repo-dir"
	login: "buddyworks"
	password: "${top_secret_password}"
Example
Using image from private registry
actions:
  - action: "Run container"
    type: "RUN_DOCKER_CONTAINER"
    docker_image_name: "buddyworks/private_image"
    docker_image_tag: "latest"
    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"
Example
Using image from Google Container Registry
actions:
  - action: "Run container"
    type: "RUN_DOCKER_CONTAINER"
    docker_image_name: "tokyo-house-147623/private_image"
    docker_image_tag: "latest"
    inline_commands: "ls -al > ls.log"
    mount_filesystem_disable: false
    working_directory: "/buddy/my-repo-dir"
	login: "_json_key"
	password: "${google_json_key}"
    registry: "my.gcr.com"
Example
Using image from Amazon ECR
actions:
  - action: "Run container"
    type: "RUN_DOCKER_CONTAINER"
    docker_image_name: "private_image"
    docker_image_tag: "latest"
    inline_commands: "ls -al > ls.log"
    mount_filesystem_disable: false
    working_directory: "/buddy/my-repo-dir"
    region: "us-east-1"
    integration_id: 1

Get started now

14 days of unlimited trial. No credit card required.