Search code examples
dockerkubernetesazure-devopsazure-aks

Not possible to use containers in Azure Pipelines self-hosted agents deployed as Azure K8s pods


We are planning to move away from an autoscaled Azure VMSS to an Azure Kubernetes Cluster for hosting our self-hosted Azure DevOps Pipeline build agents. I have now setup my first small test cluster and I am running some test pipelines. In these pipelines I am using the container feature of Azure pipelines to run jobs in dedicated container.

But as it seems this is not supported when using AKS since I am getting an error message (during "Initialize containers" step) that "docker" is not accessible/installed when running the pipeline.

Is this a limitation that I have to accept? This would mean I cannot use AKS for my self-hosted agents and pipelines. Or is there some workaround possible to make it work?

Thank you


Solution

  • It doesn't support nested containers. According to this official doc,

    Containers aren't supported when the agent is already running inside a container. You can't have nested containers.