docker-cake 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docker-cake.gemspec +1 -1
- data/lib/docker_cake.rb +3 -1
- data/lib/docker_cake/registry_api_client.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed02d96d8158acec48b8dd9ba905ae21a9222337
|
4
|
+
data.tar.gz: 5bf98209181be4cbb5e0a8e65798df7754dad952
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0c49ffe61ad9c36b00674655f5a5971415ddf988fafc54db55ddcfd267f68264f53f44312cf02c9a80fbfa388f299bc329e0551866904166a5a71147d8ee6e5
|
7
|
+
data.tar.gz: d6d3d1a5a72446b3e7b3b65301a9a92af7d735af6aed3e80b444737f82e60056e19e78a004e81fcec50d712fe35d1cb2b54baa337138c0134d78870002fd1577
|
data/docker-cake.gemspec
CHANGED
data/lib/docker_cake.rb
CHANGED
@@ -58,11 +58,13 @@ class DockerCake
|
|
58
58
|
images_map[map_key] ||= tag
|
59
59
|
|
60
60
|
manifests[tag].each do |layer|
|
61
|
+
next if layer['size'] == nil
|
62
|
+
|
61
63
|
stats[:size] += layer['size'] || 0
|
62
64
|
stats[:layers] += 1
|
63
65
|
stats[:date] = layer['created'] if layer['created'] > stats[:date]
|
64
66
|
|
65
|
-
layer_key = layer['blobSum']
|
67
|
+
layer_key = layer['blobSum'] #+ "_" + layer['id']
|
66
68
|
|
67
69
|
if counted_layers.include?(layer_key)
|
68
70
|
stats[:reuse_img] += 1
|
@@ -72,7 +72,7 @@ class RegistryApiClient
|
|
72
72
|
end
|
73
73
|
|
74
74
|
DEFAULT_REGISTRY = "https://registry.hub.docker.com"
|
75
|
-
DEFAULT_MANIFEST = "application/vnd.docker.distribution.manifest.
|
75
|
+
DEFAULT_MANIFEST = "application/vnd.docker.distribution.manifest.v1+json"
|
76
76
|
FAT_MANIFEST = "application/vnd.docker.distribution.manifest.list.v2+json"
|
77
77
|
|
78
78
|
# @param [#to_s] base_uri Docker registry base URI
|
@@ -165,7 +165,7 @@ class RegistryApiClient
|
|
165
165
|
|
166
166
|
resp = in_parallel(
|
167
167
|
basic: lambda { manifest(repo, tag) },
|
168
|
-
fat: lambda { manifest(repo, tag, manifest:
|
168
|
+
fat: lambda { manifest(repo, tag, manifest: DEFAULT_MANIFEST) }
|
169
169
|
)
|
170
170
|
|
171
171
|
unless resp[:basic]['layers']
|