2022-03-21 23:51:07 -05:00
|
|
|
steps:
|
|
|
|
- script: |
|
2022-04-01 18:48:44 -05:00
|
|
|
set -x
|
|
|
|
containers=$(docker container ls -aq)
|
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
|
2022-04-01 18:48:44 -05:00
|
|
|
exit 0
|
2022-03-21 23:51:07 -05:00
|
|
|
displayName: 'Cleanup sonic slave'
|