export: add --skip-non-distributable
The flag skips adding non-distributable blobs such as Windows layers to archive. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
		| @@ -102,6 +102,12 @@ func parseMediaTypes(mt string) (string, []string) { | ||||
| 	return s[0], ext | ||||
| } | ||||
|  | ||||
| // IsNonDistributable returns true if the media type is non-distributable. | ||||
| func IsNonDistributable(mt string) bool { | ||||
| 	return strings.HasPrefix(mt, "application/vnd.oci.image.layer.nondistributable.") || | ||||
| 		strings.HasPrefix(mt, "application/vnd.docker.image.rootfs.foreign.") | ||||
| } | ||||
|  | ||||
| // IsLayerTypes returns true if the media type is a layer | ||||
| func IsLayerType(mt string) bool { | ||||
| 	if strings.HasPrefix(mt, "application/vnd.oci.image.layer.") { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Akihiro Suda
					Akihiro Suda