GitHub Actions container action requires uses with a Dockerfile/image
A Docker container action (runs.using: docker) must point runs.image at a Dockerfile or a registry image. Omitting it leaves the runtime with nothing to build or pull.
What this error means
The action fails to start, reporting that a Docker action requires an image reference, after an action.yml declares using: docker without image.
github-actions
Error: Docker container action is missing 'image' (expected a Dockerfile or registry image reference).Common causes
Missing runs.image
using: docker requires image: pointing at Dockerfile or a registry image.
Wrong relative path to Dockerfile
A Dockerfile path that does not resolve relative to action.yml fails the build.
How to fix it
Declare the Docker image source
- Set image: Dockerfile to build from the action directory.
- Or set image: docker://ghcr.io/owner/img:tag for a prebuilt image.
- Verify the Dockerfile path is relative to action.yml.
action.yml
# action.yml
runs:
using: docker
image: DockerfileHow to prevent it
- Validate action metadata with actionlint or a schema check.
- Keep the Dockerfile beside action.yml for predictable paths.
Related guides
GitHub Actions uses with both ref and path is invalidFix a GitHub Actions uses value that mixes a local path with a ref - local actions cannot be pinned to a ref.
GitHub Actions composite action inputs not passedFix a GitHub Actions composite action whose inputs are empty - composite steps must reference inputs via the…
GitHub Actions action.yml "A mapping was found where a scalar is expected"Fix an action.yml metadata error where a scalar key received a mapping - common in runs.steps and inputs defi…