Override media type returned from Stat for existing manifests.
Signed-off-by: Richard Scothern <richard.scothern@docker.com>master
							parent
							
								
									5f7f871d8f
								
							
						
					
					
						commit
						beb5d00474
					
				|  | @ -46,6 +46,9 @@ func (mb *builder) Build(ctx context.Context) (distribution.Manifest, error) { | ||||||
| 	m.Config, err = mb.bs.Stat(ctx, configDigest) | 	m.Config, err = mb.bs.Stat(ctx, configDigest) | ||||||
| 	switch err { | 	switch err { | ||||||
| 	case nil: | 	case nil: | ||||||
|  | 		// Override MediaType, since Put always replaces the specified media
 | ||||||
|  | 		// type with application/octet-stream in the descriptor it returns.
 | ||||||
|  | 		m.Config.MediaType = MediaTypeConfig | ||||||
| 		return FromStruct(m) | 		return FromStruct(m) | ||||||
| 	case distribution.ErrBlobUnknown: | 	case distribution.ErrBlobUnknown: | ||||||
| 		// nop
 | 		// nop
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue