Blueprints

Run a Shell script in a Docker container

Source

yaml
id: docker-script-runner
namespace: company.team

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    containerImage: centos
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
      cpu:
        cpus: 1
    commands:
      - echo "Hello World!"

About this blueprint

CLI Task Runner

This flow will execute a simple shell command inside of a Docker container defined by a Task Runner. This example has additional properties for the task runner:

  • containerImage is configured as a centos docker image - The task runner will use 1 cpu

Commands

Docker

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra