java.lang.Object
io.kestra.core.models.tasks.runners.TaskRunner
io.kestra.plugin.scripts.runner.docker.Docker
All Implemented Interfaces:
io.kestra.core.models.Plugin, io.kestra.core.models.WorkerJobLifecycle

@Plugin(examples={@Example(title="Execute a Shell command.",code="id: new-shell\nnamespace: myteam\n\ntasks:\n - id: shell\n type: io.kestra.plugin.scripts.shell.Commands\n taskRunner:\n type: io.kestra.plugin.scripts.runner.docker.Docker\n commands:\n - echo \"Hello World\"",full=true),@Example(title="Pass input files to the task, execute a Shell command, then retrieve output files.",code="id: new-shell-with-file\nnamespace: myteam\n\ninputs:\n - id: file\n type: FILE\n\ntasks:\n - id: shell\n type: io.kestra.plugin.scripts.shell.Commands\n inputFiles:\n data.txt: \"{{inputs.file}}\"\n outputFiles:\n - out.txt\n containerImage: centos\n taskRunner:\n type: io.kestra.plugin.scripts.runner.docker.Docker\n commands:\n - cp {{workingDir}}/data.txt {{workingDir}}/out.txt",full=true)},beta=true) public class Docker extends io.kestra.core.models.tasks.runners.TaskRunner
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.kestra.core.models.tasks.runners.TaskRunner

    io.kestra.core.models.tasks.runners.TaskRunner.TaskRunnerBuilder<C extends io.kestra.core.models.tasks.runners.TaskRunner,B extends io.kestra.core.models.tasks.runners.TaskRunner.TaskRunnerBuilder<C,B>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Cpu
     
    protected List<DeviceRequest>
     
    protected List<String>
     
    protected List<String>
     
    protected String
     
    protected Memory
     
    protected String
     
    static final Pattern
     
    protected PullPolicy
     
    protected String
     
    protected List<String>
     

    Fields inherited from class io.kestra.core.models.tasks.runners.TaskRunner

    type
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Docker
    from(DockerOptions dockerOptions)
     
    io.kestra.core.models.tasks.runners.RunnerResult
    run(io.kestra.core.runners.RunContext runContext, io.kestra.core.models.tasks.runners.TaskCommands taskCommands, List<String> filesToUpload, List<String> filesToDownload)
     
    runnerAdditionalVars(io.kestra.core.runners.RunContext runContext, io.kestra.core.models.tasks.runners.TaskCommands taskCommands)
     

    Methods inherited from class io.kestra.core.models.tasks.runners.TaskRunner

    additionalVars, env, getIsKilled, getType, kill, onKill, runnerEnv, toAbsolutePath

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.kestra.core.models.WorkerJobLifecycle

    stop
  • Field Details

    • NEWLINE_PATTERN

      public static final Pattern NEWLINE_PATTERN
    • image

      protected String image
    • user

      @PluginProperty(dynamic=true) protected String user
    • entryPoint

      @PluginProperty(dynamic=true) protected List<String> entryPoint
    • extraHosts

      @PluginProperty(dynamic=true) protected List<String> extraHosts
    • networkMode

      @PluginProperty(dynamic=true) protected String networkMode
    • volumes

      @PluginProperty(dynamic=true) protected List<String> volumes
    • pullPolicy

      @PluginProperty protected PullPolicy pullPolicy
    • deviceRequests

      @PluginProperty protected List<DeviceRequest> deviceRequests
    • cpu

      @PluginProperty protected Cpu cpu
    • memory

      @PluginProperty protected Memory memory
  • Constructor Details

    • Docker

      public Docker()
  • Method Details

    • from

      public static Docker from(DockerOptions dockerOptions)
    • run

      public io.kestra.core.models.tasks.runners.RunnerResult run(io.kestra.core.runners.RunContext runContext, io.kestra.core.models.tasks.runners.TaskCommands taskCommands, List<String> filesToUpload, List<String> filesToDownload) throws Exception
      Specified by:
      run in class io.kestra.core.models.tasks.runners.TaskRunner
      Throws:
      Exception
    • runnerAdditionalVars

      public Map<String,Object> runnerAdditionalVars(io.kestra.core.runners.RunContext runContext, io.kestra.core.models.tasks.runners.TaskCommands taskCommands)
      Overrides:
      runnerAdditionalVars in class io.kestra.core.models.tasks.runners.TaskRunner