Skip to content

Blasteed/DO-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

72 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Build and Push on DockerHub Trivy Scan Pulls Latest DOA Version

Noble Image Trixie Image RHEL Image

Noble Vulnerabilities Trixie Vulnerabilities RHEL Vulnerabilities

Azure DevOps Agent

A lightweight, self-hosted Azure DevOps build agent based on Linux β€” available across multiple distributions and variants:

Tag prefix Base libicu Description
trixie-* debian:trixie-slim 76 Debian-based build
noble-* ubuntu:noble (24.04 LTS) 74 Ubuntu-based build
rhel-* redhat/ubi10-minimal (RHEL 10) 74 RHEL-based build

Note: These images are intentionally minimal β€” they include only what is required to run the Azure DevOps agent (git, curl, ca-certificates, and .NET runtime libraries). No Python, Node.js, or other build tools are pre-installed. See Extending the image below.


πŸš€ Quick Start

Launch the agent with automatic restart:

Debian Trixie

docker run -d \
  --name doa-agent-prod \
  --restart unless-stopped \
  -e DO_URL="https://dev.azure.com/your-organization" \
  -e DO_PAT="your_personal_access_token" \
  -e DO_POOL="your_pool_name" \
  -e DO_AGENT_NAME="DOA-Agent" \
  karfee111/do-agent:trixie-latest

Ubuntu Noble

docker run -d \
  --name doa-agent-prod \
  --restart unless-stopped \
  -e DO_URL="https://dev.azure.com/your-organization" \
  -e DO_PAT="your_personal_access_token" \
  -e DO_POOL="your_pool_name" \
  -e DO_AGENT_NAME="DOA-Agent" \
  karfee111/do-agent:noble-latest

RHEL UBI 10

docker run -d \
  --name doa-agent-prod \
  --restart unless-stopped \
  -e DO_URL="https://dev.azure.com/your-organization" \
  -e DO_PAT="your_personal_access_token" \
  -e DO_POOL="your_pool_name" \
  -e DO_AGENT_NAME="DOA-Agent" \
  karfee111/do-agent:rhel-latest

Monitor startup logs and registration:

docker logs -f doa-agent-prod

βš™οΈ Configuration Variables

The container automatically configures and registers the agent at boot using these environment variables:

Variable Description Default Required
DO_URL Full URL of your Azure DevOps organization β€” βœ…
DO_PAT Personal Access Token with Agent Pools (Read & Manage) scope β€” βœ…
DO_POOL Name of the target agent pool Default ❌
DO_AGENT_NAME Display name in the Azure DevOps panel DOA-Agent-$(hostname) ❌

πŸ’“ Healthcheck

To ensure accurate container health monitoring without adding unnecessary overhead or packages, the native Linux /proc filesystem virtual directory is used to safely track the core Agent.Listener lifecycle. A start_period of 3 minutes is recommended to allow the ./start.sh entrypoint script to safely download updates and register with Azure DevOps before monitoring begins.

Docker Run Example

To deploy with health monitoring via CLI:

docker run -d \
  --name doa-agent-prod \
  --restart unless-stopped \
  -e DO_URL="https://dev.azure.com/your-organization" \
  -e DO_PAT="your_personal_access_token" \
  -e DO_POOL="your_pool_name" \
  -e DO_AGENT_NAME="DOA-Agent" \
  --health-cmd='grep -aq "Agent.Listener" /proc/[0-9]*/cmdline || exit 1' \
  --health-interval=45s \
  --health-timeout=10s \
  --health-retries=4 \
  --health-start-period=180s \
  karfee111/do-agent:noble-latest

πŸ“¦ Docker Compose

services:
  azure-agent:
    image: karfee111/do-agent:noble-latest
    container_name: doa-agent-prod
    restart: unless-stopped
    environment:
      - DO_URL=https://dev.azure.com/your-organization
      - DO_PAT=your_personal_access_token
      - DO_POOL=your_pool_name
      - DO_AGENT_NAME=DOA-Agent
    healthcheck:
      test: ["CMD-SHELL", "grep -aq 'Agent.Listener' /proc/[0-9]*/cmdline || exit 1"]
      interval: 45s
      timeout: 10s
      retries: 4
      start_period: 180s
docker compose up -d

Variants: replace the tag with trixie-latest for Debian 13, or rhel-latest to use the RHEL 10 based image.


πŸ› οΈ Pass-through Arguments

This image forwards extra arguments directly to Microsoft's native run.sh. For example, to run a single job and exit:

docker run -d \
  --name doa-agent-once \
  -e DO_URL="https://dev.azure.com/your-organization" \
  -e DO_PAT="your_personal_access_token" \
  -e DO_POOL="your_pool_name" \
  -e DO_AGENT_NAME="DOA-Agent" \
  karfee111/do-agent:trixie-latest --once

πŸ”§ Extending the Image

RHEL variant note: If you extend the rhel-latest image, remember that UBI Minimal uses microdnf as its package manager instead of apt (e.g., RUN microdnf install -y python3 && microdnf clean all).

These images ship with the bare minimum to run the agent. If your pipelines require additional tools (Python, Node.js, .NET SDK, etc.), extend the image with your own Dockerfile:

FROM karfee111/do-agent:trixie-latest

USER root

RUN apt-get update && apt-get install -y --no-install-recommends \
    python3 \
    python3-pip \
    && rm -rf /var/lib/apt/lists/*

USER agent

Alternatively, you can override the entrypoint at runtime to install packages or run setup commands dynamically before the agent starts.

⚠️ Important: When overriding the entrypoint, you must end your execution chain with exec ./start.sh.

Via Docker Run:

docker run -d \
  --name doa-agent-prod \
  --restart unless-stopped \
  -e DO_URL="https://dev.azure.com/your-organization" \
  -e DO_PAT="your_personal_access_token" \
  -e DO_POOL="your_pool_name" \
  -e DO_AGENT_NAME="DOA-Agent" \
  --entrypoint /bin/bash \
  karfee111/do-agent:trixie-latest \
  -c "apt-get update && apt-get install -y --no-install-recommends python3 && ln -sf /usr/bin/python3 /usr/bin/python && exec ./start.sh"

Via Docker Compose:

services:
  azure-agent:
    image: karfee111/do-agent:trixie-latest
    restart: unless-stopped
    entrypoint: >
      /bin/bash -c "
      apt-get update && 
      apt-get install -y --no-install-recommends python3 && 
      ln -sf /usr/bin/python3 /usr/bin/python && 
      exec ./start.sh
      "
    environment:
      - DO_URL=https://dev.azure.com/your-organization
      - DO_PAT=your_personal_access_token
      - DO_POOL=your_pool_name
      - DO_AGENT_NAME=DOA-Agent

Tip: For production use, prefer extending via Dockerfile rather than runtime installation β€” it keeps startup fast, independent of external package mirrors, and fully reproducible.


🏷️ Tag Convention

trixie-{agent_version}.{build_number}     # Debian Trixie
noble-{agent_version}.{build_number}      # Ubuntu 24.04 LTS
rhel-{agent_version}.{build_number}       # RHEL 10 UBI Minimal

Examples: trixie-5.275.0.1, noble-5.275.0.1, rhel-5.275.0.1

latest Tags

Tag Points to
trixie-latest most recent trixie-* build
noble-latest most recent noble-* build
rhel-latest most recent rhel-* build
latest global alias pointing to the most recent noble-* build

About

A lightweight, self-hosted Azure DevOps agent based on Linux. Feedback is welcome.

Topics

Resources

License

Stars

4 stars

Watchers

1 watching

Forks

Contributors