We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc8df91 commit e0ba4caCopy full SHA for e0ba4ca
azure-pipelines.yml
@@ -100,10 +100,16 @@ steps:
100
101
- script: dir $(Build.SourcesDirectory)/code-examples-python-private/app
102
103
-- task: CmdLine@2
104
- inputs:
105
- script: 'docker rm -f $(docker ps -a -q)'
106
- continueOnError: true
+- script: |
+ echo "Checking for running Docker containers..."
+ containers=$(docker ps -q)
+ if [ ! -z "$containers" ]; then
107
+ echo "Stopping running Docker containers..."
108
+ docker stop $(docker ps -q)
109
+ else
110
+ echo "No Docker containers are running."
111
+ fi
112
+ displayName: "check for running containers"
113
114
- script: |
115
docker system prune -a --force
0 commit comments