Skip to content

Instantly share code, notes, and snippets.

@isc30
Created Mar 30, 2021
Embed
What would you like to do?
docker azure agent
version: '3.4'
services:
azure-agent:
restart: "unless-stopped"
image: ${DOCKER_REGISTRY-}azure-agent:latest
build:
context: .
dockerfile: Dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- AZDO_URL=https://dev.azure.com/YOUR_ORG/
- AZDO_TOKEN=YOUR_TOKEN
FROM czon/azdo-agent:ubuntu-20.04-2.182.1
USER root
# Install the latest Docker CE binaries and add user `jenkins` to the docker group
RUN apt-get update && \
apt-get -y --no-install-recommends install apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common && \
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get -y --no-install-recommends install docker-ce && \
apt-get clean && \
newgrp docker && \
curl --insecure -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment