[azp]: Fix type in slave container cleanup (#10424)
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
This commit is contained in:
parent
a9a37c8ba1
commit
0f488a8cb6
@ -1,7 +1,7 @@
|
|||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
containers=$(docker container ls -a | grep "sonic-slave" | awk '{ print $1 }')
|
containers=$(docker container ls -a | grep "sonic-slave" | awk '{ print $1 }')
|
||||||
[ -n "$containers" ] && docker container rm -f containers
|
[ -n "$containers" ] && docker container rm -f $containers
|
||||||
docker images | grep "^<none>" | awk '{print$3}' | xargs -i docker rmi {}
|
docker images | grep "^<none>" | awk '{print$3}' | xargs -i docker rmi {}
|
||||||
images=$(docker images 'sonic-slave-*' -a -q)
|
images=$(docker images 'sonic-slave-*' -a -q)
|
||||||
[ -n "$images" ] && docker rmi -f $images
|
[ -n "$images" ] && docker rmi -f $images
|
||||||
|
Reference in New Issue
Block a user