Cross-Platform Container Builds with Azure Pipelines
Feb 21, 2019Edward Thomson

Summary
This post details how to configure Azure Pipelines to use custom Docker containers for build jobs. It provides a step-by-step guide on creating a Dockerfile with necessary dependencies (e.g., `yum install` for CentOS), building the Docker image, pushing it to a registry (Docker Hub), and then referencing it in the `azure-pipelines.yml` file using the `resources.containers` and `container` syntax. It also demonstrates how to map local directories to container directories for source and binary access, and how to share build scripts between local and CI environments. A specific example of building libgit2 on CentOS with updated libssh2 is provided to illustrate troubleshooting and dependency management within containers.
More from the Azure Pipelines Agent Operating System Support trail
- April Patches for Azure DevOps Server and Team Foundation Server
- CDN Domain URL change for Agents in Pipelines
- Announcing the General Availability of Managed DevOps Pools (MDP) for Azure DevOps
- Announcing Public Preview of Managed DevOps Pools (MDP) for Azure DevOps
- End of support for Azure Pipelines agents running on CentOS 6, Debian 4.9, Fedora 32, Ubuntu 16, macOS 10.14, and older versions