Run a task in a Docker container.

This task runner executes tasks in a container-based Docker-compatible engine. Use the containerImage property to configure the image for the task.

To access the task's working directory, use the {{workingDir}} Pebble expression or the WORKING_DIR environment variable. Input files and namespace files added to the task will be accessible from that directory.

To generate output files, we recommend using the outputFiles task's property. This allows you to explicitly define which files from the task's working directory should be saved as output files.

Alternatively, when writing files in your task, you can leverage the {{outputDir}} Pebble expression or the OUTPUT_DIR environment variable. All files written to that directory will be saved as output files automatically.

yaml
type: "io.kestra.plugin.scripts.runner.docker.Docker"