summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-18 06:26:18 -0400
committerGitHub <noreply@github.com>2020-09-18 06:26:18 -0400
commit273b9545bbf457fb48ff005b4f771b91c3f40681 (patch)
treea5c9bfc25ddac2747ac871c2e84295b0cfc336e3 /pkg/domain/infra
parent562d0ca00342dc650aca058f534cb9f21582ebdb (diff)
parentec58650939e8dacb3b53740699bcd6df4746cc51 (diff)
downloadpodman-273b9545bbf457fb48ff005b4f771b91c3f40681.tar.gz
podman-273b9545bbf457fb48ff005b4f771b91c3f40681.tar.bz2
podman-273b9545bbf457fb48ff005b4f771b91c3f40681.zip
Merge pull request #7679 from baude/remoteiidfile
enable --iidfile for podman-remote build
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/tunnel/images.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 50b8342a3..332a7c2eb 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -306,7 +306,22 @@ func (ir *ImageEngine) Config(_ context.Context) (*config.Config, error) {
}
func (ir *ImageEngine) Build(_ context.Context, containerFiles []string, opts entities.BuildOptions) (*entities.BuildReport, error) {
- return images.Build(ir.ClientCxt, containerFiles, opts)
+ report, err := images.Build(ir.ClientCxt, containerFiles, opts)
+ if err != nil {
+ return nil, err
+ }
+ // For remote clients, if the option for writing to a file was
+ // selected, we need to write to the *client's* filesystem.
+ if len(opts.IIDFile) > 0 {
+ f, err := os.Create(opts.IIDFile)
+ if err != nil {
+ return nil, err
+ }
+ if _, err := f.WriteString(report.ID); err != nil {
+ return nil, err
+ }
+ }
+ return report, nil
}
func (ir *ImageEngine) Tree(ctx context.Context, nameOrID string, opts entities.ImageTreeOptions) (*entities.ImageTreeReport, error) {