Docker "failed to create shim task" runtime error in CI
containerd starts each container through a shim process that manages the OCI task. When the shim cannot be created - a transient containerd hiccup, a missing or broken runc, or resource pressure spawning the process - the container fails to start with failed to create shim task. The transient form clears on retry; a structural one (missing runtime) does not.
What this error means
A container start fails with Error response from daemon: failed to create shim task. Sometimes a wrapped OCI runtime message follows.
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: unable to start container process: error during container initCommon causes
A transient containerd/shim spawn failure
Resource pressure or a momentary containerd issue can fail the shim creation for one start.
A missing or broken OCI runtime
If runc is absent or incompatible, every shim/task creation fails - that is structural, not transient.
How to fix it
Re-run the container start
- Retry - a one-off shim creation failure is usually transient.
- If it recurs every time, the runtime is broken (see next fix).
docker run --rm myorg/api:1.4.2Verify the OCI runtime is installed
- Confirm runc is present and runnable.
- Reinstall the runtime if it is missing or broken.
runc --version
docker info | grep -i runtimeHow to prevent it
- Keep containerd and runc healthy and up to date.
- Avoid host resource exhaustion during heavy container churn.
- Retry transient shim-task failures before deeper debugging.