https://github.com/steffbeckers/azure-pipelines-agent-docker
Azure Pipelines Agent (Docker)
https://github.com/steffbeckers/azure-pipelines-agent-docker
azure-devops azure-pipelines docker docker-compose
Last synced: over 1 year ago
JSON representation
Azure Pipelines Agent (Docker)
- Host: GitHub
- URL: https://github.com/steffbeckers/azure-pipelines-agent-docker
- Owner: steffbeckers
- Created: 2021-04-19T20:10:41.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-19T20:42:42.000Z (about 5 years ago)
- Last Synced: 2024-07-29T17:04:51.705Z (almost 2 years ago)
- Topics: azure-devops, azure-pipelines, docker, docker-compose
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Azure Pipelines Agent (Docker)
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops#linux
## Caution
Using Docker within a Docker container
In order to use Docker from within a Docker container, you bind-mount the Docker socket.
Doing this has serious security implications. The code inside the container can now run as root on your Docker host.
## Build and push image
```
docker build -t registry.steffbeckers.eu/azure-pipelines-agent .
docker push registry.steffbeckers.eu/azure-pipelines-agent
```
OR
```
docker-compose -f docker-compose.build.yml build
docker-compose -f docker-compose.build.yml push
```
## Run the agent on a linux docker host
```
docker pull registry.steffbeckers.eu/azure-pipelines-agent
docker run -d --name=azure-pipelines-agent --restart=always -e AZP_URL=https://dev.azure.com/steffbeckers -e AZP_TOKEN= -e AZP_AGENT_NAME=DESKTOP-STEFF -v /var/run/docker.sock:/var/run/docker.sock registry.steffbeckers.eu/azure-pipelines-agent
```
OR
```
docker-compose pull
docker-compose up -d
```