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 4acad70 commit 326b325Copy full SHA for 326b325
azure-pipelines.yml
@@ -86,10 +86,16 @@ steps:
86
87
- script: dir $(Build.SourcesDirectory)/code-examples-ruby-private
88
89
-- task: CmdLine@2
90
- inputs:
91
- script: 'docker rm -f $(docker ps -a -q)'
92
- continueOnError: true
+- script: |
+ echo "Checking for running Docker containers..."
+ containers=$(docker ps -q)
+ if [ ! -z "$containers" ]; then
93
+ echo "Stopping running Docker containers..."
94
+ docker stop $(docker ps -q)
95
+ else
96
+ echo "No Docker containers are running."
97
+ fi
98
+ displayName: "check for running containers"
99
100
- script: |
101
docker system prune -a --force
0 commit comments