---
title: "Running AI agents in GitHub Actions with Docker Sandboxes"
description: "GitHub Agentic Workflows (gh-aw 0.82.9) supports Docker Sandboxes (sbx) as an agent runtime, so a CI coding agent gets root, sudo and unrestricted shell inside a disposable microVM with its own kernel and private Docker daemon."
url: "https://swe.quest/articles/running-ai-agents-in-github-actions-with-docker-sandboxes-9cf9181798d75585"
canonical: "https://www.docker.com/blog/running-ai-agents-in-github-actions-with-docker-sandboxes/"
source: "Docker"
published: "2026-08-21"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["ai-agents","sandboxing","ci-cd","virtualization","ai-coding"]
---

# Running AI agents in GitHub Actions with Docker Sandboxes

A post on [Docker](https://swe.quest/sources/docker.md), published 2026-08-21, 7 min read, How-to. Original: [https://www.docker.com/blog/running-ai-agents-in-github-actions-with-docker-sandboxes/](https://www.docker.com/blog/running-ai-agents-in-github-actions-with-docker-sandboxes/)

## Summary

GitHub Agentic Workflows (gh-aw 0.82.9) supports Docker Sandboxes (sbx) as an agent runtime, so a CI coding agent gets root, sudo and unrestricted shell inside a disposable microVM with its own kernel and private Docker daemon. Outside that VM it is limited by a network allowlist, a read-only token and a safe-output job that may only touch src/\*\*. In the worked example, a Copilot agent on an ubuntu-24.04 runner runs a Java 21 Testcontainers/PostgreSQL suite, adds a regression test exposing a case-sensitive email uniqueness bug, applies a one-line normalization fix, and opens a draft PR. The run took about 11 minutes, and setup needs Docker credentials as secrets plus a KVM-capable host for self-hosted runners.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Virtualization](https://swe.quest/tags/virtualization.md) (Infrastructure)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)

## Prerequisites

- GitHub Actions workflows ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))
- Docker basics ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- Testcontainers

## Keywords

GitHub Agentic Workflows, Docker Sandboxes, sbx, GitHub Copilot, Testcontainers, PostgreSQL, GitHub Actions

## Related posts

- [The Untrusted Autonomous Workload: How AI Coding Agents Reshape What Isolation Has to Do](https://swe.quest/articles/the-untrusted-autonomous-workload-how-ai-coding-agents-reshape-what-isolation-af433bee97ff8809.md): Docker · 2026-05-26 · Medium · 16 min read · Sandboxing & isolation, Virtualization, AI agents, Containers, Supply chain security
  AI coding agents are untrusted, autonomous workloads that containers were never designed to isolate, so Docker Sandboxes runs each agent in a microVM (custom VMM on Hypervisor.framework, WHP or KVM) with its own kernel and private Docker Engine.
- [Building AI Teams: How Docker Sandboxes and Docker Agent Transform Development](https://swe.quest/articles/building-ai-teams-how-docker-sandboxes-and-docker-agent-transform-development-50a60f5e32d42807.md): Docker · 2026-03-11 · Medium · 9 min read · AI agents, Sandboxing & isolation, Containers, AI for coding, Virtualization
  Docker Agent defines teams of specialized AI agents in YAML, where a root "product manager" agent delegates to designer, engineer, QA and fixer sub-agents, each with its own model, instructions and toolsets (filesystem, shell, think, todo, memory, MCP).
- [Why AI Agents Need Isolation](https://swe.quest/articles/why-ai-agents-need-isolation-2e7b1a6342af3236.md): Docker · 2026-07-01 · Easy · 9 min read · Sandboxing & isolation, AI agents, Virtualization, Containers, AI for coding
  AI coding agents that run commands, install packages and handle credentials should execute behind an isolation boundary rather than directly on the developer's host.
- [Highlights from AWS re:Invent: Supercharging Kiro with Docker Sandboxes and MCP Catalog](https://swe.quest/articles/highlights-from-aws-re-invent-supercharging-kiro-with-docker-sandboxes-and-mcp-a18d4753910b06e8.md): Docker · 2025-12-12 · Medium · 7 min read · AI agents, Sandboxing & isolation, Containers, AI for coding
  Docker Sandboxes run coding agents like AWS's Kiro inside isolated containers that see only the project directory and none of the host's credentials, while the Docker MCP Toolkit supplies tools through a gateway that injects secrets only into the specific MCP server that needs them.
- [A Virtual Agent team at Docker: How the Coding Agent Sandboxes team uses a fleet of agents to ship faster](https://swe.quest/articles/a-virtual-agent-team-at-docker-how-the-coding-agent-sandboxes-team-uses-a-fleet-c083dfabe4b49d2c.md): Docker · 2026-05-01 · Medium · 12 min read · AI agents, AI for coding, CI/CD, Testing, Developer productivity
  Docker's Coding Agent Sandboxes (sbx) team runs a "Fleet" of seven autonomous Claude Code skill-based agent roles: build engineer, project manager, product owner, CLI tester, performance tester, upgrade tester and software engineer.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
