Home az-docker-agent
Post
Cancel

az-docker-agent

Azure Devops Agent

Prerequisites

  • docker and docker-compose

Usage:

Build the image

1
docker build -t thanhtunguet/azure-devops-agent:latest .

Start image

1
docker-compose up -d

Environment variables

1
2
3
4
5
AZP_URL=
AZP_TOKEN=
AZP_AGENT_NAME=
AZP_POOL=
AZP_WORK=_work

AZP_URL: đường dẫn của Azure Devops server

AZP_TOKEN: Personal access token

AZP_POOL: Agent pool dành cho các agent được tạo ra

AZP_AGENT_NAME: Tên prefix của các Agent

Tạo personal access token

https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows

Sử dụng docker-compose

1
2
3
4
5
6
7
8
9
10
11
version: '3'
services:
  agent:
    image: thanhtunguet/azure-devops-agent:latest
    env_file: .env
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/bin/docker:/usr/bin/docker
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
This post is licensed under CC BY 4.0 by the author.