GitHub Actions: Runners, Containers, Services, and Self-Hosted Execution/Run the job inside a container
Use a container image as the job runtime.
Section: Choosing and targeting runners
Run the job inside a container
yaml
yaml
container:
image: node:20-bookwormExplanation
Job containers help standardize tools and dependencies across runs.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Choosing and targeting runners