We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d0df25 commit 8b46181Copy full SHA for 8b46181
azure-pipelines.yml
@@ -87,10 +87,17 @@ steps:
87
- script: dir $(Build.SourcesDirectory)/code-examples-java-private
88
89
- script: dir $(Build.SourcesDirectory)/code-examples-java-private/src/main/resources
90
-- task: CmdLine@2
91
- inputs:
92
- script: 'docker rm -f $(docker ps -a -q)'
93
- continueOnError: true
+
+- script: |
+ echo "Checking for running Docker containers..."
+ containers=$(docker ps -q)
94
+ if [ ! -z "$containers" ]; then
95
+ echo "Stopping running Docker containers..."
96
+ docker stop $(docker ps -q)
97
+ else
98
+ echo "No Docker containers are running."
99
+ fi
100
+ displayName: "check for running containers"
101
102
- script: |
103
docker system prune -a --force
0 commit comments