简体   繁体   中英

Delete docker images from docker hub

How can i delete last 10 tags of the images in dockerhub from public or private repo? I am using azure container registry for saving images

!/bin/bash

for i in {1..10} do az acr repository show-tags -n {container registry name} --repository {repo name} --top $i --orderby time_asc | xargs -IX az acr repository delete -n {container registry name} -t {repo name}:X --yes

done

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM