Project

Profile

Help

Issue #3749

Updated by ipanova@redhat.com over 5 years ago

Some images like windows base images, contain artifacts whose distribution is restricted by license. 
 These artifacts are called foreign layers. 
 We should not upload these layers from the skopeo copy output. 

 * skopeo copy dir transport downloads download foreign layers 

 We will check the mediatype of the layer and skip the upload of the foreign layers. 

 <pre> 
 [ipanova@ina tips]$ sudo skopeo copy docker://portainer/portainer:windows-amd64-1.13.0 dir:existingemptydirectory2 
 Getting image source signatures 
 Copying blob sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277 
  240.98 MB / 240.98 MB [=================================================] 2m57s 
 Copying blob sha256:4a8c367fd46d2e2da2a8b0fa02158540e13b3a9015daf9f17d1af354a591492f 
  116.32 MB / 116.32 MB [=================================================] 2m11s 
 Copying blob sha256:feedefe2c110863b761bb71ba7199fefe1058afecbe68752d051c2ca0899e266 
  3.51 MB / 3.51 MB [========================================================] 0s 
 Copying blob sha256:bb652e12abcfb1b0681c29dcff44a842f54869d6a5d6c57de1523b275af77c17 
  952 B / 952 B [============================================================] 0s 
 Copying blob sha256:4addfdf3b551b41da10b28fb9e0e0702d568e68ce2330183220384358f0f7d9c 
  947 B / 947 B [============================================================] 0s 
 Copying blob sha256:ad5cdcb7aa1e047a4ac348b74b5652c8a16fcb3dd013c288f8e65a095995c1d4 
  948 B / 948 B [============================================================] 0s 
 Copying blob sha256:6bd5a5818cacdc9744192da603a8765e793ac1b5dcb1bf1efacbe81df875ea06 
  943 B / 943 B [============================================================] 0s 
 Copying config sha256:7cc9ff24526dfffdb8c188e6bae7e11d75d1ac5731d85e6fdccd5c7382d84207 
  2.31 KB / 2.31 KB [========================================================] 0s 
 Writing manifest to image destination 
 Storing signatures 
 [ipanova@ina tips]$ ll existingemptydirectory2/ 
 total 369524 
 -rw-r--r--. 1 root root 121971948 Jun    8 13:38 4a8c367fd46d2e2da2a8b0fa02158540e13b3a9015daf9f17d1af354a591492f 
 -rw-r--r--. 1 root root         947 Jun    8 13:38 4addfdf3b551b41da10b28fb9e0e0702d568e68ce2330183220384358f0f7d9c 
 -rw-r--r--. 1 root root         943 Jun    8 13:38 6bd5a5818cacdc9744192da603a8765e793ac1b5dcb1bf1efacbe81df875ea06 
 -rw-r--r--. 1 root root        2369 Jun    8 13:38 7cc9ff24526dfffdb8c188e6bae7e11d75d1ac5731d85e6fdccd5c7382d84207 
 -rw-r--r--. 1 root root         948 Jun    8 13:38 ad5cdcb7aa1e047a4ac348b74b5652c8a16fcb3dd013c288f8e65a095995c1d4 
 -rw-r--r--. 1 root root         952 Jun    8 13:38 bb652e12abcfb1b0681c29dcff44a842f54869d6a5d6c57de1523b275af77c17 
 -rw-r--r--. 1 root root 252691002 Jun    8 13:36 bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277 
 -rw-r--r--. 1 root root     3684048 Jun    8 13:38 feedefe2c110863b761bb71ba7199fefe1058afecbe68752d051c2ca0899e266 
 -rw-r--r--. 1 root root        1982 Jun    8 13:38 manifest.json 
 -rw-r--r--. 1 root root          33 Jun    8 13:33 version 


 $ ./done-docker-token portainer/portainer:windows-amd64-1.13.0 
 { 
   "schemaVersion": 2, 
   "config": { 
     "digest": "sha256:7cc9ff24526dfffdb8c188e6bae7e11d75d1ac5731d85e6fdccd5c7382d84207", 
     "size": 2369, 
     "mediaType": "application/vnd.docker.container.image.v1+json"  
   }, 
   "layers": [ 
     { 
       "digest": "sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277", 
       "size": 252691002, 
       "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip", 
       "urls": [ 
         "https://go.microsoft.com/fwlink/?linkid=837858"  
       ] 
     }, 
     { 
       "digest": "sha256:4a8c367fd46d2e2da2a8b0fa02158540e13b3a9015daf9f17d1af354a591492f", 
       "size": 121971948, 
       "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip", 
       "urls": [ 
         "https://go.microsoft.com/fwlink/?linkid=848906"  
       ] 
     }, 
     { 
       "digest": "sha256:feedefe2c110863b761bb71ba7199fefe1058afecbe68752d051c2ca0899e266", 
       "size": 3684048, 
       "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip"  
     }, 
     { 
       "digest": "sha256:bb652e12abcfb1b0681c29dcff44a842f54869d6a5d6c57de1523b275af77c17", 
       "size": 952, 
       "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip"  
     }, 
     { 
       "digest": "sha256:4addfdf3b551b41da10b28fb9e0e0702d568e68ce2330183220384358f0f7d9c", 
       "size": 947, 
       "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip"  
     }, 
     { 
       "digest": "sha256:ad5cdcb7aa1e047a4ac348b74b5652c8a16fcb3dd013c288f8e65a095995c1d4", 
       "size": 948, 
       "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip"  
     }, 
     { 
       "digest": "sha256:6bd5a5818cacdc9744192da603a8765e793ac1b5dcb1bf1efacbe81df875ea06", 
       "size": 943, 
       "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip"  
     } 
   ], 
   "mediaType": "application/vnd.docker.distribution.manifest.v2+json"  
 </pre>

Back