summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-05-05 16:16:38 +0530
committerAditya R <arajan@redhat.com>2022-05-05 16:16:41 +0530
commitc38e7e5f6172b5f8728ab03d0d36335aaba53553 (patch)
tree80e0bc686b26024deae051149903805ae9db3d85
parent8ed517576cc185ddfa5d2e3af9c034e9ae375841 (diff)
downloadpodman-c38e7e5f6172b5f8728ab03d0d36335aaba53553.tar.gz
podman-c38e7e5f6172b5f8728ab03d0d36335aaba53553.tar.bz2
podman-c38e7e5f6172b5f8728ab03d0d36335aaba53553.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>
-rw-r--r--cmd/podman/images/build.go5
-rw-r--r--docs/source/markdown/podman-build.1.md2
2 files changed, 6 insertions, 1 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 {
diff --git a/docs/source/markdown/podman-build.1.md b/docs/source/markdown/podman-build.1.md
index 63ed6f9da..b372bfce6 100644
--- a/docs/source/markdown/podman-build.1.md
+++ b/docs/source/markdown/podman-build.1.md
@@ -479,7 +479,7 @@ Windows base images, so using this option is usually unnecessary.
Output destination (format: type=local,dest=path)
-The --output (or -o) option extends the default behavior of building a container image by allowing users to export the contents of the image as files on the local filesystem, which can be useful for generating local binaries, code generation, etc.
+The --output (or -o) option extends the default behavior of building a container image by allowing users to export the contents of the image as files on the local filesystem, which can be useful for generating local binaries, code generation, etc. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
The value for --output is a comma-separated sequence of key=value pairs, defining the output type and options.