GitHub Actions "Container operations are only supported on Linux runners"
By Kaveh Alemi·Latchkey
Job-level "container:" requires a Linux runner. macOS and Windows GitHub-hosted runners cannot run container jobs or service containers, so the job fails at initialization.
What this error means
A job with a "container:" key on runs-on macos-latest or windows-latest fails immediately, reporting that containers are Linux-only.
github-actions
##[error]Container operations are only supported on Linux runners.
Common causes
runs-on is not a Linux image
The job specifies a macOS or Windows runner while also declaring container or services, which only the Linux runtime supports.
How to fix it
Move the container job to a Linux runner
Set runs-on to ubuntu-latest (or a Linux self-hosted label) for any job using container or services.
If you genuinely need macOS/Windows, drop the container and install tooling directly on the runner.