From fbab06796a4c9bc17d65259c7d6c85a483e9aefb Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 5 May 2022 13:48:33 -0400 Subject: Vendor in containers/buildah@v1.26.1 Signed-off-by: Daniel J Walsh --- docs/source/markdown/podman-build.1.md | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'docs/source/markdown') diff --git a/docs/source/markdown/podman-build.1.md b/docs/source/markdown/podman-build.1.md index bd1e673b8..63ed6f9da 100644 --- a/docs/source/markdown/podman-build.1.md +++ b/docs/source/markdown/podman-build.1.md @@ -280,6 +280,14 @@ Set custom DNS options to be used during the build. Set custom DNS search domains to be used during the build. +#### **--env** *env[=value]* + +Add a value (e.g. env=*value*) to the built image. Can be used multiple times. +If neither `=` nor a `*value*` are specified, but *env* is set in the current +environment, the value from the current environment will be added to the image. +To remove an environment variable from the built image, use the `--unsetenv` +option. + #### **--file**, **-f**=*Containerfile* Specifies a Containerfile which contains instructions for building the image, @@ -449,6 +457,43 @@ Set the OS of the image to be built, and that of the base image to be pulled, if the build uses one, instead of using the current operating system of the build host. +#### **--os-feature** *feature* + +Set the name of a required operating system *feature* for the image which will +be built. By default, if the image is not based on *scratch*, the base image's +required OS feature list is kept, if the base image specified any. This option +is typically only meaningful when the image's OS is Windows. + +If *feature* has a trailing `-`, then the *feature* is removed from the set of +required features which will be listed in the image. + +#### **--os-version** *version* + +Set the exact required operating system *version* for the image which will be +built. By default, if the image is not based on *scratch*, the base image's +required OS version is kept, if the base image specified one. This option is +typically only meaningful when the image's OS is Windows, and is typically set in +Windows base images, so using this option is usually unnecessary. + +#### **--output**, **-o**="" + +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 value for --output is a comma-separated sequence of key=value pairs, defining the output type and options. + +Supported _keys_ are: +- **dest**: Destination path for exported output. Valid value is absolute or relative path, `-` means the standard output. +- **type**: Defines the type of output to be used. Valid values is documented below. + +Valid _type_ values are: +- **local**: write the resulting build files to a directory on the client-side. +- **tar**: write the resulting files as a single tarball (.tar). + +If no type is specified, the value defaults to **local**. +Alternatively, instead of a comma-separated sequence, the value of **--output** can be just a destination (in the `**dest** format) (e.g. `--output some-path`, `--output -`) where `--output some-path` is treated as if **type=local** and `--output -` is treated as if **type=tar**. + #### **--pid**=*pid* Sets the configuration for PID namespaces when handling `RUN` instructions. -- cgit v1.2.3-54-g00ecf From 4716b6b1b2504f875ba157d157cf023804f98e5c Mon Sep 17 00:00:00 2001 From: Aditya R Date: Thu, 5 May 2022 16:16:38 +0530 Subject: 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 Signed-off-by: Daniel J Walsh --- cmd/podman/images/build.go | 5 +++++ docs/source/markdown/podman-build.1.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/source/markdown') 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. -- cgit v1.2.3-54-g00ecf