Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. Zazcallabah
    3. Best

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    ZazcallabahZ Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 5
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: How to find out package disk space?

      I managed to get somewhat what I needed from the native api.
      I wrote this script which displays the sum of each image layers, grouped by package

      $key = "<key with native api access>"
      $uribase="http://<proget server>/api/json/"
      $feedid = <feed id>
      $packages = Invoke-webrequest "$($uribase)DockerImages_GetRepositories?key=$($key)&Feed_ID=$feedid" | select -expandproperty Content | convertfrom-json
      
      $size_lookup = @{}
      
      
      $data = @()
      $total = $packages.length
      $count = 0;
      $packages | %{
      	$n = [uri]::EscapeDataString($_.Repository_Name)
      	$progressPreference = 'silentlyContinue'
      	$images = Invoke-webrequest "$($uribase)DockerImages_GetImages?key=$($key)&Feed_ID=$($feedid)&Repository_name=$n" | select -expandproperty Content | convertfrom-json
      	$progressPreference = 'Continue'
      	$images | %{
      
      		$manifest = [System.Text.Encoding]::UTF8.GetString( [Convert]::FromBase64String($_.ManifestJson_Bytes) ) | convertfrom-json
      		$layers = $manifest.layers
      		$sizesum = $layers | ?{$_.size -ne $null } | measure -sum size | select -ExpandProperty sum
      		$obj = @{}
      
      		$obj.Add("Feed",$_.feed_id)
      		$obj.Add("Repository",$_.Repository_name)
      		$obj.Add("Manifest",$manifest )
      		$obj.Add("Layersum", $sizesum )
      		$obj.Add("DownloadCount",$_.Download_Count)
      		$obj.Add("Published",$_.Published_Date)
      		$data += $obj
      
      	}
      
      	$count++
      	write-progress -PercentComplete ($count*100/$total) -Activity "Working..."
      }
      
      $data | convertto-json -depth 99 | set-content -encoding utf8 out.json
      
      $data | group-object Repository | %{
      	$s=$_.group | measure -sum layersum | select -ExpandProperty sum;
      	$n = $_.name;
      	new-object psobject -Property @{"name"=$n;"size"=$s}
      } | sort-object size
      
      
      
      
      
      posted in Support
      ZazcallabahZ
      Zazcallabah
    • How to find out package disk space?

      Dealing with a low disk space situation, I'm having trouble locating which docker packages are taking up space. I know from the "manage registry" page that the whole feed is taking up some 99% of the disk, which isn't really helping me.

      I need to know how much disk space is claimed by each package - each of which can have hundreds of tagged versions. Is this information available anywhere?

      posted in Support
      ZazcallabahZ
      Zazcallabah
    • 1 / 1