Skip to content

Instantly share code, notes, and snippets.

@goyalmohit
Created December 23, 2018 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goyalmohit/2440ab18cba37532a21519f24ab6db10 to your computer and use it in GitHub Desktop.
Save goyalmohit/2440ab18cba37532a21519f24ab6db10 to your computer and use it in GitHub Desktop.
Contains docker command to run vsts agent as docker container to build docker images for source code
docker run \
-e VSTS_ACCOUNT=<youraccountname> \
-e VSTS_TOKEN=<your-account-Private-access-token> \
-e VSTS_AGENT='$(hostname)-agent' \
-e VSTS_POOL=dockerized-vsts-agents \
-e VSTS_WORK='/var/vsts/$VSTS_AGENT' \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/vsts:/var/vsts \
-d microsoft/vsts-agent:<docker-image-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment