mirror of
https://github.com/containers/podman.git
synced 2025-12-03 11:49:18 +08:00
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
This commit is contained in:
committed by
Atomic Bot
parent
95ea3d4f3a
commit
be217caa38
7
vendor/github.com/projectatomic/buildah/image.go
generated
vendored
7
vendor/github.com/projectatomic/buildah/image.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user