summaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-16 15:05:28 -0400
committerGitHub <noreply@github.com>2021-09-16 15:05:28 -0400
commit2a30b60666001b7039aaf5318ffeaa0374433f27 (patch)
tree421afa18f2bdb6c03d2be3872b6135efdf8282da /cmd/podman/images
parentfcb22e82b518bd8de31bc152b78d2cbc6ab09964 (diff)
parent29edeaa892df2f533f997adb0736f09a6f8e0965 (diff)
downloadpodman-2a30b60666001b7039aaf5318ffeaa0374433f27.tar.gz
podman-2a30b60666001b7039aaf5318ffeaa0374433f27.tar.bz2
podman-2a30b60666001b7039aaf5318ffeaa0374433f27.zip
Merge pull request #11598 from mheon/34_backportsreleasenotes
Backports and release notes for v3.4.0-RC1
Diffstat (limited to 'cmd/podman/images')
-rw-r--r--cmd/podman/images/build.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index a1a28b809..642da0c83 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -11,6 +11,7 @@ import (
buildahDefine "github.com/containers/buildah/define"
buildahCLI "github.com/containers/buildah/pkg/cli"
"github.com/containers/buildah/pkg/parse"
+ buildahUtil "github.com/containers/buildah/pkg/util"
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
@@ -359,6 +360,12 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
}
}
+ cleanTmpFile := false
+ flags.Authfile, cleanTmpFile = buildahUtil.MirrorToTempFileIfPathIsDescriptor(flags.Authfile)
+ if cleanTmpFile {
+ defer os.Remove(flags.Authfile)
+ }
+
args := make(map[string]string)
if c.Flag("build-arg").Changed {
for _, arg := range flags.BuildArg {
@@ -476,7 +483,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
runtimeFlags = append(runtimeFlags, "--systemd-cgroup")
}
- imageOS, arch, err := parse.PlatformFromOptions(c)
+ platforms, err := parse.PlatformsFromOptions(c)
if err != nil {
return nil, err
}
@@ -490,7 +497,6 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
AddCapabilities: flags.CapAdd,
AdditionalTags: tags,
Annotations: flags.Annotation,
- Architecture: arch,
Args: args,
BlobDirectory: flags.BlobCache,
CNIConfigDir: flags.CNIConfigDir,
@@ -516,11 +522,11 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
MaxPullPushRetries: 3,
NamespaceOptions: nsValues,
NoCache: flags.NoCache,
- OS: imageOS,
OciDecryptConfig: decConfig,
Out: stdout,
Output: output,
OutputFormat: format,
+ Platforms: platforms,
PullPolicy: pullPolicy,
PullPushRetryDelay: 2 * time.Second,
Quiet: flags.Quiet,