Hi Sanginatham Venkata Nagendra
Change your docker-compose.yml
volume to use an environment variable with a default:
volumes:
- ${LOCAL_WWWROOT:-/tmp/wwwroot}:/app/wwwroot
- Locally (Windows):
LOCAL_WWWROOT
points toc:\mga_xsc_api_qa
- In CI (Linux): defaults to
/tmp/wwwroot
ifLOCAL_WWWROOT
is not set
In your classic pipeline’s Docker Compose build task:
Go to the Variables tab
Add:
Name: LOCAL_WWWROOT
Value: `/tmp/wwwroot`
Scope: Pipeline (not secret)
This way, during the build on Linux agents, docker-compose uses /tmp/wwwroot
instead of c:\mga_xsc_api_qa
.
In your pipeline task settings, add these environment variables to the Docker-related tasks:
DOCKER_BUILDKIT - 1
COMPOSE_DOCKER_CLI_BUILD - 1
This ensures docker-compose build
uses BuildKit, which is faster and more stable on Microsoft-hosted agents.
Add timeout to prevent hanging:
timeout 600 docker-compose build xc.xsc.api
And also monitor this github for more updates - https://github.com/actions/runner-images/issues/12688
Hope this helps!
Please Let me know if you have any queries.