1
0
mirror of https://github.com/containers/buildah.git synced 2025-07-30 04:23:09 +03:00

imagebuildah: move multiple-platform building internal

Move multiple-platform build juggling logic from the CLI wrapper
directly into the imagebuildah package, to make using it easier for
packages that consume us as a library.

This requires reading Dockerfiles into byte slices so that we can
re-parse them for each per-platform build, rather than parsing them
directly, as we used to, since building modifies the parsed tree.

When building for multiple platforms, prefix progress log messages with
the platform description.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai
2021-08-10 18:11:15 -04:00
parent ea7127cf69
commit 34d6ee13b8
7 changed files with 198 additions and 126 deletions

View File

@ -197,7 +197,7 @@ func (b *Builder) addManifest(ctx context.Context, manifestName string, imageSpe
names, err := util.ExpandNames([]string{manifestName}, systemContext, b.store)
if err != nil {
return "", errors.Wrapf(err, "error encountered while expanding image name %q", manifestName)
return "", errors.Wrapf(err, "error encountered while expanding manifest list name %q", manifestName)
}
ref, err := util.VerifyTagName(imageSpec)