module AppRb::Util::Registry
Public Class Methods
clean(registry, image_name, keep_tags = [])
click to toggle source
# File lib/app-rb/util/registry.rb, line 7 def self.clean(registry, image_name, keep_tags = []) (tags_list(registry, image_name) - keep_tags).each do |hash| digest = AppRb::Util.just_cmd("curl -s --head -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' https://#{registry}/v2/#{image_name}/manifests/#{hash} | grep Docker-Content-Digest | cut -d' ' -f2") AppRb::Util.do_it "curl -s -X DELETE https://#{registry}/v2/#{image_name}/manifests/#{digest}" end end