What is Azure Pipelines Agent?
Azure DevOps prices CI by the parallel job: a monthly fee per Microsoft-hosted pipeline, a smaller one per additional self-hosted one - and the free grant for new organizations currently requires a request form. Bringing your own agent is the documented, encouraged escape hatch.
Microsoft ships no agent container image; their docs provide a Dockerfile recipe instead - which is exactly what this template packages. On first boot the agent downloads itself from your organization, registers into the pool with your PAT, and starts taking jobs; on shutdown it deregisters cleanly.
Script, checkout, and task steps run in-container. The usual platform note applies: no Docker daemon, so container jobs and Docker tasks stay on hosted agents or switch to rootless builders.
What you get
- Built from Microsoft’s official Dockerfile recipe - no third-party image
- Auto-registers on boot, deregisters on shutdown (--replace safe)
- Pool-based targeting: pool: Default in your YAML
- Service-principal auth supported upstream if PATs are banned
- Extend the Dockerfile with your toolchains
- Unlimited minutes - no per-minute billing
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
agent | Azure Pipelines agent, outbound to dev.azure.com | no - no ingress needed |
Before you deploy
AZP_URLhttps://dev.azure.com/your-org
AZP_TOKENPAT with Agent Pools (read, manage) scope
Sizing and billing
The agent idles light; .NET and Java builds are the RAM consumers. One agent = one parallel job - add replicas (each with a distinct AZP_AGENT_NAME via prefix) for concurrency.
A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 4.88 GiB of volumes cost $0.15 per GiB a month ($0.73/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| Azure Pipelines | Microsoft-hosted | $40/mo | per parallel job per month; self-hosted parallel jobs $15/mo each (first free) |
Prices from each vendor's pricing page, June 2026.
Run it locally first
The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.
Questions
What does this replace, cost-wise?
Azure DevOps charges a monthly fee per Microsoft-hosted parallel job and a lower license fee per extra self-hosted parallel job (the first is free). The agent’s compute here can share a flat resource with the rest of your stack - so a second and third pipeline cost license fees, not separate VM bills.
Why is there no official agent image?
Microsoft deliberately documents a build-your-own Dockerfile (the agent version-locks to your org and updates itself). This template is that recipe, faithfully: ubuntu:24.04, the documented start.sh flow, non-root agent user, clean deregistration trap.
Do classic and YAML pipelines both work?
Yes - the agent is the same for both. Target it via the agent pool. Container jobs and Docker@2-style tasks need a daemon this platform does not expose; everything script- and task-based runs normally.