mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-01 00:23:56 +08:00 
			
		
		
		
	build: docker exporter should instead use oci with containerd
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
		| @@ -63,6 +63,23 @@ func (c *Client) LoadImage(ctx context.Context, name string, status progress.Wri | ||||
| 	}, nil | ||||
| } | ||||
|  | ||||
| func (c *Client) Features(ctx context.Context, name string) map[Feature]bool { | ||||
| 	features := make(map[Feature]bool) | ||||
| 	if dapi, err := c.API(name); err == nil { | ||||
| 		if info, err := dapi.Info(ctx); err == nil { | ||||
| 			for _, v := range info.DriverStatus { | ||||
| 				switch v[0] { | ||||
| 				case "driver-type": | ||||
| 					if v[1] == "io.containerd.snapshotter.v1" { | ||||
| 						features[OCIImporter] = true | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return features | ||||
| } | ||||
|  | ||||
| type waitingWriter struct { | ||||
| 	*io.PipeWriter | ||||
| 	f      func() | ||||
|   | ||||
							
								
								
									
										5
									
								
								util/dockerutil/features.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								util/dockerutil/features.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| package dockerutil | ||||
|  | ||||
| type Feature string | ||||
|  | ||||
| const OCIImporter Feature = "OCI importer" | ||||
		Reference in New Issue
	
	Block a user
	 Justin Chadwell
					Justin Chadwell