summaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-05-05 16:16:38 +0530
committerDaniel J Walsh <dwalsh@redhat.com>2022-05-05 13:52:09 -0400
commit4716b6b1b2504f875ba157d157cf023804f98e5c (patch)
tree8f13c518cff74a071f707b5b8a88e8bde1f704ec /cmd/podman/images
parentfbab06796a4c9bc17d65259c7d6c85a483e9aefb (diff)
downloadpodman-4716b6b1b2504f875ba157d157cf023804f98e5c.tar.gz
podman-4716b6b1b2504f875ba157d157cf023804f98e5c.tar.bz2
podman-4716b6b1b2504f875ba157d157cf023804f98e5c.zip
build: disable --output for podman-remote clients
Disable `build --output` for remote clients and update docs. [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R <arajan@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/images')
-rw-r--r--cmd/podman/images/build.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index 1ceb63684..3ea60e18a 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -190,6 +190,7 @@ func buildFlags(cmd *cobra.Command) {
_ = flags.MarkHidden("tls-verify")
_ = flags.MarkHidden("compress")
_ = flags.MarkHidden("volume")
+ _ = flags.MarkHidden("output")
}
}
@@ -201,6 +202,10 @@ func build(cmd *cobra.Command, args []string) error {
return errors.New("cannot specify --squash, --squash-all and --layers options together")
}
+ if cmd.Flag("output").Changed && registry.IsRemote() {
+ return errors.New("'--output' option is not supported in remote mode")
+ }
+
// Extract container files from the CLI (i.e., --file/-f) first.
var containerFiles []string
for _, f := range buildOpts.File {