Skip to content

Commit 87245ba

Browse files
Update azure-pipelines.yml for Azure Pipelines
1 parent 6a7fc5b commit 87245ba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

azure-pipelines.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,15 @@ steps:
9393
continueOnError: true
9494

9595
- script: |
96-
docker system prune -a --force
97-
displayName: "cleanup docker files"
96+
echo "Checking for running Docker containers..."
97+
containers=$(docker ps -q)
98+
if [ ! -z "$containers" ]; then
99+
echo "Stopping running Docker containers..."
100+
docker stop $(docker ps -q)
101+
else
102+
echo "No Docker containers are running."
103+
fi
104+
displayName: "check for running containers"
98105

99106
- script: |
100107
echo "kill and remove any running containers"

0 commit comments

Comments
 (0)