Skip to content

Commit

Permalink
update containers/image
Browse files Browse the repository at this point in the history
ImageDestination.{PutBlob,TryReusingBlob} are extended to receive the
index of the layer in the corresponding image.  Some transports,
containers storage in particular, require the layers to be comitted in
sequence.  The new sequencing allows containers storage to commit the
layers in PutBlob.

Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Apr 17, 2019
1 parent e255ccc commit eebf683
Show file tree
Hide file tree
Showing 14 changed files with 342 additions and 169 deletions.
4 changes: 2 additions & 2 deletions cmd/skopeo/layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ func (opts *layersOptions) run(args []string, stdout io.Writer) (retErr error) {
}
}()

for _, bd := range blobDigests {
for index, bd := range blobDigests {
r, blobSize, err := rawSource.GetBlob(ctx, types.BlobInfo{Digest: bd.digest, Size: -1}, cache)
if err != nil {
return err
}
if _, err := dest.PutBlob(ctx, r, types.BlobInfo{Digest: bd.digest, Size: blobSize}, cache, bd.isConfig); err != nil {
if _, err := dest.PutBlob(ctx, r, types.BlobInfo{Digest: bd.digest, Size: blobSize}, index, cache, bd.isConfig); err != nil {
if closeErr := r.Close(); closeErr != nil {
return errors.Wrapf(err, " (close error: %v)", closeErr)
}
Expand Down
4 changes: 2 additions & 2 deletions vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
github.com/urfave/cli v1.20.0
github.com/kr/pretty v0.1.0
github.com/kr/text v0.1.0
github.com/containers/image e9c3d17ddb8cb5d48450bc0588525b17b181c049
github.com/containers/buildah 25b7c1164a262934a6526ded1115dfacfc51f8ec
github.com/containers/image commit https://github.com/vrothberg/image
github.com/containers/buildah image-commit https://github.com/vrothberg/buildah
github.com/vbauerster/mpb v3.3.4
github.com/mattn/go-isatty v0.0.4
github.com/VividCortex/ewma v1.1.1
Expand Down
5 changes: 3 additions & 2 deletions vendor/github.com/containers/buildah/vendor.conf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 56 additions & 34 deletions vendor/github.com/containers/image/copy/copy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eebf683

Please sign in to comment.