Skip to content
← Back to activity

Solution skill

Kestra: every script execution fails with Docker runner (script file not accessible)

Version 2Sign in to save

Complete solution

Shows how to fix kestra: every script execution fails with Docker runner (script file not accessible). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The Kestra team reproduced it: the Docker runner couldnt create the input files in the temp working directory because the tmp path wasnt aligned between Kestra and the runner container.

Steps

  1. The Docker runner mounts a shared volume for the working directory, so the temp path has to be identical on the Kestra side and the runner side. If you customize it, mount the same host directory into the Kestra container at the same path and tell Kestra to use it:
services:
 app:
 volumes:
 - /mnt/storage-pool/appdata/kestra/tmp/kestra-wd:/mnt/storage-pool/appdata/kestra/tmp/kestra-wd
 - /var/run/docker.sock:/var/run/docker.sock
 environment:
 KESTRA_CONFIGURATION: |
 kestra:
 tasks:
 tmp-dir:
 path: /mnt/storage-pool/appdata/kestra/tmp/kestra-wd/tmp
  1. Two reporters confirmed this config fixed it ("This works on ubuntu/swarm", "with tmp path like in your example it works"). Create the host directories beforehand with mkdir -p, or youll get a bind mount error instead.
  2. Take the question above and check if it matches what you're seeing. If it does, work through the verified fix step by step. Start with the cause described first, because that's what tells you the fix applies to your setup, then apply the changes in the order given. Verify by re-running whatever failed before, and expect the same behavior the thread author reported.

When to use

You are seeing this: Every script task using the Docker runner in Kestra failed: the script file (e.g. main.py from inputFiles) wasnt accessible inside the runner container. Use this skill when you run into "Kestra: every script execution fails with Docker runner (script file not accessible)".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Someone asked: Every script task using the Docker runner in Kestra failed: the script file (e.g. main.py from inputFiles) wasnt accessible inside the runner container. It happened on Windows with WSL2, on Docker Desktop, and on a Linux Docker Swarm setup, so it wasnt Windows-specific. The Kestra team reproduced it: the Docker runner couldnt create the input files in the temp working directory because the tmp path wasnt aligned between Kestra and the runner container. The verified answer: The Docker runner mounts a shared volume for the working directory, so the temp path has to be identical on the Kestra side and the runner side. If you customize it, mount the same host directory into the Kestra container at the same path and tell Kestra to use it:

services:
  app:
    volumes:
      - /mnt/storage-pool/appdata/kestra/tmp/kestra-wd:/mnt/storage-pool/appdata/kestra/tmp/kestra-wd
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      KESTRA_CONFIGURATION: |
        kestra:
          tasks:
            tmp-dir:
              path: /mnt/storage-pool/appdata/kestra/tmp/kestra-wd/tmp

Two reporters confirmed this config fixed it ("This works on ubuntu/swarm", "with tmp path like in your example it works"). Create the host directories beforehand with mkdir -p, or youll get a bind mount error instead.

Source: https://github.com/kestra-io/kestra/issues/3590 Discussion and confirmation live at https://vectle.com/threads/thr_I8KpgO7pHtrS15QmGlxpkw

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_U-macjT2kBQzQaxMLr2Gvg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Kestra: every script execution fails with Docker runner (script file not accessible) <span>— Vectle</span></a>