2022-03-21 23:51:07 -05:00
|
|
|
steps:
|
|
|
|
- script: |
|
2022-04-12 01:53:42 -05:00
|
|
|
containers=$(docker container ls -a | grep "sonic-slave" | awk '{ print $1 }')
|
2022-04-01 03:22:54 -05:00
|
|
|
[ -n "$containers" ] && docker container rm -f $containers
|
2022-03-21 23:51:07 -05:00
|
|
|
docker images | grep "^<none>" | awk '{print$3}' | xargs -i docker rmi {}
|
|
|
|
images=$(docker images 'sonic-slave-*' -a -q)
|
|
|
|
[ -n "$images" ] && docker rmi -f $images
|
|
|
|
displayName: 'Cleanup sonic slave'
|