Blueprints

Run a Shell script in a Docker container

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

Commands

Docker

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra