"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "components/engine/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go" between
docker-ce-19.03.2.tar.gz and docker-ce-19.03.3.tar.gz

About: Docker CE is a project to pack, ship and run any application as a lightweight container. Docker containers can run anywhere, on a laptop or at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more. Community edition.

converter.go  (docker-ce-19.03.2):converter.go  (docker-ce-19.03.3)
skipping to change at line 230 skipping to change at line 230
} }
ref = remotes.MakeRefKey(ctx, config) ref = remotes.MakeRefKey(ctx, config)
if err := content.WriteBlob(ctx, c.contentStore, ref, bytes.NewReader(b), config); err != nil { if err := content.WriteBlob(ctx, c.contentStore, ref, bytes.NewReader(b), config); err != nil {
return ocispec.Descriptor{}, errors.Wrap(err, "failed to write co nfig") return ocispec.Descriptor{}, errors.Wrap(err, "failed to write co nfig")
} }
return desc, nil return desc, nil
} }
// ReadStripSignature reads in a schema1 manifest and returns a byte array
// with the "signatures" field stripped
func ReadStripSignature(schema1Blob io.Reader) ([]byte, error) {
b, err := ioutil.ReadAll(io.LimitReader(schema1Blob, manifestSizeLimit))
// limit to 8MB
if err != nil {
return nil, err
}
return stripSignature(b)
}
func (c *Converter) fetchManifest(ctx context.Context, desc ocispec.Descriptor) error { func (c *Converter) fetchManifest(ctx context.Context, desc ocispec.Descriptor) error {
log.G(ctx).Debug("fetch schema 1") log.G(ctx).Debug("fetch schema 1")
rc, err := c.fetcher.Fetch(ctx, desc) rc, err := c.fetcher.Fetch(ctx, desc)
if err != nil { if err != nil {
return err return err
} }
b, err := ioutil.ReadAll(io.LimitReader(rc, manifestSizeLimit)) // limit to 8MB b, err := ReadStripSignature(rc)
rc.Close() rc.Close()
if err != nil { if err != nil {
return err return err
} }
b, err = stripSignature(b)
if err != nil {
return err
}
var m manifest var m manifest
if err := json.Unmarshal(b, &m); err != nil { if err := json.Unmarshal(b, &m); err != nil {
return err return err
} }
c.pulledManifest = &m c.pulledManifest = &m
return nil return nil
} }
func (c *Converter) fetchBlob(ctx context.Context, desc ocispec.Descriptor) erro r { func (c *Converter) fetchBlob(ctx context.Context, desc ocispec.Descriptor) erro r {
 End of changes. 3 change blocks. 
6 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)