Sign inSign up

andrewconnell/azure-pipelines-linux-agent

By andrewconnell

•Updated about 7 years ago

Azure Pipelines self-hosted Linux agent docker container

Image
0

303

andrewconnell/azure-pipelines-linux-agent repository overview

⁠Azure Pipeline Linux Agent (Docker image)

This is a custom Azure Pipelines agent created as a Linux container to replace the deprecated Microsoft Pipelines Agent⁠. It is based off Ubuntu 16.04 & contains most of the software that is installed on the Microsoft-hosted Ubuntu 16.04 agents.

The image is based on a merge of the instructions Running a self-hosted agent in Docker: Linux⁠ & adding installer scripts from the official images found in the Github repo Microsoft/azure-pipelines-image-generation⁠.

Almost all software installed on the base Ubuntu hosted VM agent's that Microsoft maintains is installed in this image. Some things were not installed that I personally don't use at this time. All scripts from the Ubuntu 16.04 image are in this repo & listed in the Dockerfile for install, but some have been commented out.

⁠How to Use this Image

The Azure Pipelines agent must be started with account connection information, provided through environment variables:

Env VariableDescriptionExample
AZP_URLrequired Url to the Azure DevOps accounthttps://dev.azure.com/contoso⁠
AZP_TOKENrequired Azure DevOps user account personal access token (PAT) granting access to the AZP_URL******
AZP_AGENT_NAMEoptional Name of the agent. If not specified, the container's hostname is usedmydockeragent
AZP_POOLoptional Azure Pipelines agent pool name. If not specified, Default is used.My Custom Agent Pool
AZP_WORKoptional Work directory. If not specified, _work is used._work

Example:

docker run \
  -e AZP_URL=https://dev.azure.com/contoso \
  -e AZP_TOKEN=m23qugcXXXXXXXXXXXXXXXmvurfvra \
  -e AZP_AGENT_NAME=mydockeragent \
  azure-pipelines-linux-agent:latest

Once the agent is running, it will appear in the list of agents in the specified DevOps pipeline agent pool.

⁠How it Works

Running the image will execute the start.sh script. This script checks for required environment variables first & then downloads+installs the latest Azure Pipelines agent. After installing the latest agent, it configures it and starts it up to listen for jobs.

Tag summary

Content type

Image

Digest

Size

1.4 GB

Last updated

about 7 years ago

docker pull andrewconnell/azure-pipelines-linux-agent:dev-service