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'"