Skip to content

Instantly share code, notes, and snippets.

@isc30
Created March 30, 2021 14:51
Show Gist options
  • Save isc30/88098ae493b0aedfdd949cf4facd7345 to your computer and use it in GitHub Desktop.
Save isc30/88098ae493b0aedfdd949cf4facd7345 to your computer and use it in GitHub Desktop.
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