Sign inSign up

karfee111/do-agent

By karfee111

•Updated 23 days ago

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

Image
Developer tools
0

816

karfee111/do-agent repository overview

Repo Latest DOA Version

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 prefixBaselibicuDescription
trixie-*debian:trixie-slim76Debian-based build
noble-*ubuntu:noble (24.04 LTS)74Ubuntu-based build
rhel-*redhat/ubi10-minimal (RHEL 10)74RHEL-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:

VariableDescriptionDefaultRequired
DO_URLFull URL of your Azure DevOps organizationā€”āœ…
DO_PATPersonal Access Token with Agent Pools (Read & Manage) scopeā€”āœ…
DO_POOLName of the target agent poolDefaultāŒ
DO_AGENT_NAMEDisplay name in the Azure DevOps panelDOA-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
TagPoints to
trixie-latestmost recent trixie-* build
noble-latestmost recent noble-* build
rhel-latestmost recent rhel-* build
latestglobal alias pointing to the most recent noble-* build

Tag summary

Content type

Image

Digest

sha256:4ccd54aff…

Size

70.6 MB

Last updated

23 days ago

docker pull karfee111/do-agent