ADO agent - Azure Devops CICD agent
156
This Docker image provides a pre-configured Azure DevOps agent (VSTS agent) based on Ubuntu Jammy (22.04), tailored for environments behind a proxy and with retry logic for agent configuration.
ubuntu:jammy-202506194.258.1/
βββ Dockerfile
βββ script.sh # Main entrypoint for agent setup and execution
βββ README.md # You're here!
docker build -t custom-ado-agent:latest .
docker run -d --name ado-agent -e AZURE_DEVOPS_ORG_URL="https://dev.azure.com/<your-org>" -e AZURE_DEVOPS_PROJECT_NAME="<your-project>" -e AZURE_DEVOPS_POOL_NAME="SelfHosted" -e AZURE_DEVOPS_POOL_AGENT_NAME="ado-agent" -e http_proxy="http://proxy-host:port" -e https_proxy="http://proxy-host:port" -e http_proxy_user="your-username" -e http_proxy_pass="your-password" -v /path/to/token:/etc/AZURE_DEVOPS_PAT_TOKEN:ro custom-ado-agent:latest
π‘ Make sure the file
/path/to/tokencontains your Azure DevOps PAT (Personal Access Token) with agent management permissions.
| Variable Name | Required | Description |
|---|---|---|
AZURE_DEVOPS_ORG_URL | β | Azure DevOps organization URL |
AZURE_DEVOPS_PROJECT_NAME | β | Azure DevOps project name |
AZURE_DEVOPS_POOL_NAME | β | Agent pool name |
AZURE_DEVOPS_POOL_AGENT_NAME | β | Logical name of the agent |
http_proxy, https_proxy | β | Proxy settings (optional) |
http_proxy_user | β | Username for proxy (if authentication required) |
http_proxy_pass | β | Password for proxy (required if http_proxy_user is set) |
Logs are written to:
/home/vstsagent/vsts-agent.log
You can access them using:
docker exec -it ado-agent tail -f /home/vstsagent/vsts-agent.log
On container termination (SIGTERM, SIGINT, EXIT), the agent automatically:
config.sh remove if neededdocker exec -it ado-agent /bin/bash
cat /home/vstsagent/vsts-agent.log
https://aka.ms/InstallAzureCLIDeb)vsts-agent-linux-x64-4.258.1.tar.gz)To stop and remove the agent:
docker stop ado-agent && docker rm ado-agent
To remove the image:
docker rmi custom-ado-agent:latest
This image is provided as-is without any official support from Microsoft. Use at your own discretion.
This image provides a self-hosted Azure DevOps Agent (formerly VSTS) built on Ubuntu Jammy, preconfigured with support for:
β
Proxy authentication
β
Azure CLI
β
Retry + graceful cleanup logic
β
Lightweight footprint with Git and required system tools
vsts-agent-linux-x64-4.258.1docker run -d --name ado-agent -e AZURE_DEVOPS_ORG_URL="https://dev.azure.com/<your-org>" -e AZURE_DEVOPS_PROJECT_NAME="<your-project>" -e AZURE_DEVOPS_POOL_NAME="SelfHosted" -e AZURE_DEVOPS_POOL_AGENT_NAME="ado-agent" -v /path/to/token:/etc/AZURE_DEVOPS_PAT_TOKEN:ro <your-image-name>:<tag>
βΉοΈ For proxy support, pass
http_proxy,https_proxy,http_proxy_user, andhttp_proxy_passenvironment variables.
The agent gracefully deregisters on container shutdown via trap handling.
This image is automatically built via GitHub autobuild from the Dockerfile and entrypoint script in the linked repository.
Content type
Image
Digest
sha256:07f4c3834β¦
Size
556.6 MB
Last updated
over 1 year ago
docker pull spidocker4/vstsagent:mcr-jdk-20250705