You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flags.StringArrayVar(&opts.addFile, "add-file", nil, "add contents of a file to the image at a specified path (`source:destination`)")
80
83
flags.StringVar(&opts.authfile, "authfile", auth.GetDefaultAuthFile(), "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
// Disable the implicit `completion` command in cobra.
@@ -98,7 +99,7 @@ func init() {
98
99
rootCmd.PersistentFlags().StringVar(&globalFlagResults.UserShortNameAliasConfPath, "short-name-alias-conf", "", "path to short name alias cache file (not usually used)")
Copy file name to clipboardexpand all lines: cmd/buildah/manifest.go
+1-1
Original file line number
Diff line number
Diff line change
@@ -231,7 +231,7 @@ func init() {
231
231
flags.StringVar(&manifestPushOpts.compressionFormat, "compression-format", "", "compression format to use")
232
232
flags.IntVar(&manifestPushOpts.compressionLevel, "compression-level", 0, "compression level to use")
233
233
flags.StringVarP(&manifestPushOpts.format, "format", "f", "", "manifest type (oci or v2s2) to attempt to use when pushing the manifest list (default is manifest type of source)")
234
-
flags.StringSliceVar(&manifestPushOpts.addCompression, "add-compression", nil, "add instances with selected compression while pushing")
234
+
flags.StringArrayVar(&manifestPushOpts.addCompression, "add-compression", defaultContainerConfig.Engine.AddCompression.Get(), "add instances with selected compression while pushing")
235
235
flags.BoolVarP(&manifestPushOpts.removeSignatures, "remove-signatures", "", false, "don't copy signatures when pushing images")
236
236
flags.StringVar(&manifestPushOpts.signBy, "sign-by", "", "sign the image using a GPG key with the specified `FINGERPRINT`")
237
237
flags.StringVar(&manifestPushOpts.signaturePolicy, "signature-policy", "", "`pathname` of signature policy file (not usually used)")
Copy file name to clipboardexpand all lines: docs/buildah-build.1.md
+13-5
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Set the ARCH of the image to be built, and that of the base image to be pulled,
51
51
52
52
**--authfile***path*
53
53
54
-
Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. If XDG_RUNTIME_DIR is not set, the default is /run/containers/$UID/auth.json. This file is created using `buildah login`.
54
+
Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. See containers-auth.json(5) for more information. This file is created using `buildah login`.
55
55
56
56
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
57
57
@@ -708,6 +708,8 @@ Valid _type_ values are:
708
708
If no type is specified, the value defaults to **local**.
709
709
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**.
710
710
711
+
Note: The **--tag** option can also be used to change the file image format to supported `containers-transports(5)`.
712
+
711
713
**--pid***how*
712
714
713
715
Sets the configuration for PID namespaces when handling `RUN` instructions.
The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR`
1033
1041
must be an absolute path as well. Buildah bind-mounts the `HOST-DIR` to the
@@ -1310,7 +1318,7 @@ registries.conf is the configuration file which specifies which container regist
1310
1318
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.
<aname="Footnote1">1</a>: 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.
Copy file name to clipboardexpand all lines: docs/buildah-commit.1.md
+16-3
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,24 @@ with a registry name component, `localhost` will be added to the name. If
14
14
name, the `buildah images` command will display `<none>` in the `REPOSITORY` and
15
15
`TAG` columns.
16
16
17
+
The *image* value supports all transports from `containers-transports(5)`. If no transport is specified, the `containers-storage` (i.e., local storage) transport is used.
18
+
17
19
## RETURN VALUE
18
20
The image ID of the image that was created. On error, 1 is returned and errno is returned.
19
21
20
22
## OPTIONS
21
23
24
+
**--add-file***source[:destination]*
25
+
26
+
Read the contents of the file `source` and add it to the committed image as a
27
+
file at `destination`. If `destination` is not specified, the path of `source`
28
+
will be used. The new file will be owned by UID 0, GID 0, have 0644
29
+
permissions, and be given a current timestamp unless the **--timestamp** option
30
+
is also specified. This option can be specified multiple times.
31
+
22
32
**--authfile***path*
23
33
24
-
Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. If XDG_RUNTIME_DIR is not set, the default is /run/containers/$UID/auth.json. This file is created using `buildah login`.
34
+
Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. See containers-auth.json(5) for more information. This file is created using `buildah login`.
25
35
26
36
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
27
37
@@ -192,9 +202,12 @@ Unset environment variables from the final image.
192
202
This example saves an image based on the container.
193
203
`buildah commit containerID newImageName`
194
204
195
-
This example saves an image named newImageName based on the container.
205
+
This example saves an image named newImageName based on the container and removes the working container.
196
206
`buildah commit --rm containerID newImageName`
197
207
208
+
This example commits to an OCI archive file named /tmp/newImageName based on the container.
This example saves an image with no name, removes the working container, and creates a new container using the image's ID.
199
212
`buildah from $(buildah commit --rm containerID)`
200
213
@@ -260,4 +273,4 @@ registries.conf is the configuration file which specifies which container regist
260
273
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.
0 commit comments