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.
2 parents 7a2d8d2 + 87245ba commit 0e6cfdaCopy full SHA for 0e6cfda
azure-pipelines.yml
@@ -87,6 +87,22 @@ steps:
87
88
- script: dir $(Build.SourcesDirectory)/code-examples-php-private
89
90
+- task: CmdLine@2
91
+ inputs:
92
+ script: 'docker rm -f $(docker ps -a -q)'
93
+ continueOnError: true
94
+
95
+- script: |
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"
105
106
- script: |
107
echo "kill and remove any running containers"
108
docker rm -f $(docker ps -a -q)
0 commit comments