From 59ea8af1b3b5ef6d56d9508776e1c8ee979c7025 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 17 Dec 2023 07:00:58 -0500 Subject: [PATCH] Document use of containers-transports values in buildah Fixes: https://github.com/containers/buildah/issues/4740 Signed-off-by: Daniel J Walsh --- docs/buildah-build.1.md | 11 ++++++++++- docs/buildah-commit.1.md | 7 ++++++- docs/buildah-push.1.md | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/buildah-build.1.md b/docs/buildah-build.1.md index fca504fb582..41037e790ad 100644 --- a/docs/buildah-build.1.md +++ b/docs/buildah-build.1.md @@ -708,6 +708,8 @@ Valid _type_ values are: 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**. +Note: The **--tag** option can also be used to change the file image format to supported `containers-transports(5)`. + **--pid** *how* Sets the configuration for PID namespaces when handling `RUN` instructions. @@ -872,6 +874,13 @@ Specifies the name which will be assigned to the resulting image if the build process completes successfully. If _imageName_ does not include a registry name component, the registry name *localhost* will be prepended to the image name. +The **--tag** option supports all transports from `containers-transports(5)`. +If no transport is specified, the `container-storage` (i.e., local storage) transport is used. + + __buildah build --tag=oci-archive:./foo.ociarchive .__ + + __buildah build -t quay.io/username/foo .__ + **--target** *stageName* Set the target build stage to build. When building a Containerfile with multiple build stages, --target @@ -1310,7 +1319,7 @@ registries.conf is the configuration file which specifies which container regist Signature policy file. This defines the trust policy for container images. Controls which container registries can be used for image, and whether or not the tool should trust the images. ## SEE ALSO -buildah(1), cpp(1), buildah-login(1), docker-login(1), namespaces(7), pid\_namespaces(7), containers-policy.json(5), containers-registries.conf(5), user\_namespaces(7), crun(1), runc(8), containers.conf(5), oci-hooks(5) +buildah(1), cpp(1), buildah-login(1), docker-login(1), namespaces(7), pid\_namespaces(7), containers-policy.json(5), containers-registries.conf(5), user\_namespaces(7), crun(1), runc(8), containers.conf(5), oci-hooks(5), containers-transports(5) ## FOOTNOTES 1: The Buildah project is committed to inclusivity, a core value of open source. The `master` and `slave` mount propagation terminology used here is problematic and divisive, and should be changed. However, these terms are currently used within the Linux kernel and must be used as-is at this time. When the kernel maintainers rectify this usage, Buildah will follow suit immediately. diff --git a/docs/buildah-commit.1.md b/docs/buildah-commit.1.md index 5e1b88eee74..5ea00e89770 100644 --- a/docs/buildah-commit.1.md +++ b/docs/buildah-commit.1.md @@ -14,6 +14,8 @@ with a registry name component, `localhost` will be added to the name. If name, the `buildah images` command will display `` in the `REPOSITORY` and `TAG` columns. +The *Image* value supports all transports from `containers-transports(5)`. If no transport is specified, the `container-storage` (i.e., local storage) transport is used. + ## RETURN VALUE The image ID of the image that was created. On error, 1 is returned and errno is returned. @@ -203,6 +205,9 @@ This example saves an image based on the container. This example saves an image named newImageName based on the container. `buildah commit --rm containerID newImageName` +This example commits to an OCI Directory named /tmp/newImageName based on the container. + `buildah commit --rm containerID oci-archive:/tmp/newImageName` + This example saves an image with no name, removes the working container, and creates a new container using the image's ID. `buildah from $(buildah commit --rm containerID)` @@ -268,4 +273,4 @@ registries.conf is the configuration file which specifies which container regist Signature policy file. This defines the trust policy for container images. Controls which container registries can be used for image, and whether or not the tool should trust the images. ## SEE ALSO -buildah(1), buildah-images(1), containers-policy.json(5), containers-registries.conf(5) +buildah(1), buildah-images(1), containers-policy.json(5), containers-registries.conf(5), containers-transports(5) diff --git a/docs/buildah-push.1.md b/docs/buildah-push.1.md index 1d57bc8bb5f..f83c90b4fda 100644 --- a/docs/buildah-push.1.md +++ b/docs/buildah-push.1.md @@ -181,4 +181,4 @@ registries.conf is the configuration file which specifies which container regist Signature policy file. This defines the trust policy for container images. Controls which container registries can be used for image, and whether or not the tool should trust the images. ## SEE ALSO -buildah(1), buildah-login(1), containers-policy.json(5), docker-login(1), containers-registries.conf(5), buildah-manifest(1) +buildah(1), buildah-login(1), containers-policy.json(5), docker-login(1), containers-registries.conf(5), buildah-manifest(1), containers-transports(5)