ac9c0b5269
Why I did it docker hub will limit the pull rate. Use ACR instead to pull debian related docker image. How I did it Set DEFAULT_CONTAINER_REGISTRY in pipeline.
11 lines
357 B
YAML
11 lines
357 B
YAML
steps:
|
|
- script: |
|
|
set -x
|
|
containers=$(docker container ls -aq)
|
|
[ -n "$containers" ] && docker container rm -f $containers
|
|
docker images | grep "^<none>" | awk '{print$3}' | xargs -i docker rmi {}
|
|
images=$(docker images 'sonic-slave-*' -a -q)
|
|
[ -n "$images" ] && docker rmi -f $images
|
|
exit 0
|
|
displayName: 'Cleanup sonic slave'
|