diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-06-07 01:00:07 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-13 12:49:32 +0000 |
commit | be217caa3856c76a6b997c203422715e13b0335a (patch) | |
tree | 49190e0813ba860ccc74d017ccf12562e009c6bc /vendor/github.com/projectatomic/buildah/image.go | |
parent | 95ea3d4f3a77d014fdd1be43411ba96a85091712 (diff) | |
download | podman-be217caa3856c76a6b997c203422715e13b0335a.tar.gz podman-be217caa3856c76a6b997c203422715e13b0335a.tar.bz2 podman-be217caa3856c76a6b997c203422715e13b0335a.zip |
Vendor in latest buildah code
This will add --layers support.
Also add missing information in man pages on podman build features.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #938
Approved by: umohnani8
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/image.go')
-rw-r--r-- | vendor/github.com/projectatomic/buildah/image.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/github.com/projectatomic/buildah/image.go b/vendor/github.com/projectatomic/buildah/image.go index 1cb5d7022..070f721d4 100644 --- a/vendor/github.com/projectatomic/buildah/image.go +++ b/vendor/github.com/projectatomic/buildah/image.go @@ -55,6 +55,7 @@ type containerImageRef struct { exporting bool squash bool tarPath func(path string) (io.ReadCloser, error) + parent string } type containerImageSource struct { @@ -178,6 +179,7 @@ func (i *containerImageRef) createConfigsAndManifests() (v1.Image, v1.Manifest, if err := json.Unmarshal(i.dconfig, &dimage); err != nil { return v1.Image{}, v1.Manifest{}, docker.V2Image{}, docker.V2S2Manifest{}, err } + dimage.Parent = docker.ID(digest.FromString(i.parent)) // Always replace this value, since we're newer than our base image. dimage.Created = created // Clear the list of diffIDs, since we always repopulate it. @@ -404,6 +406,7 @@ func (i *containerImageRef) NewImageSource(ctx context.Context, sc *types.System EmptyLayer: false, } dimage.History = append(dimage.History, dnews) + dimage.Parent = docker.ID(digest.FromString(i.parent)) // Sanity check that we didn't just create a mismatch between non-empty layers in the // history and the number of diffIDs. @@ -578,7 +581,7 @@ func (i *containerImageSource) GetBlob(ctx context.Context, blob types.BlobInfo) return ioutils.NewReadCloserWrapper(layerFile, closer), size, nil } -func (b *Builder) makeImageRef(manifestType string, exporting bool, squash bool, compress archive.Compression, historyTimestamp *time.Time) (types.ImageReference, error) { +func (b *Builder) makeImageRef(manifestType, parent string, exporting bool, squash bool, compress archive.Compression, historyTimestamp *time.Time) (types.ImageReference, error) { var name reference.Named container, err := b.store.Container(b.ContainerID) if err != nil { @@ -604,6 +607,7 @@ func (b *Builder) makeImageRef(manifestType string, exporting bool, squash bool, if historyTimestamp != nil { created = historyTimestamp.UTC() } + ref := &containerImageRef{ store: b.store, compression: compress, @@ -622,6 +626,7 @@ func (b *Builder) makeImageRef(manifestType string, exporting bool, squash bool, exporting: exporting, squash: squash, tarPath: b.tarPath(), + parent: parent, } return ref, nil } |