Skip to content

Commit b66921a

Browse files
committed
docs: document compression flags for commit and push
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
1 parent 77d0628 commit b66921a

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

docs/buildah-commit.1.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ Apply the change to the committed image that would have been made if it had
5656
been built using a Containerfile which included the specified instruction.
5757
This option can be specified multiple times.
5858

59+
**--compression-format** *format*
60+
61+
Specifies the compression format to use. Supported values are: `gzip`, `zstd` and `zstd:chunked`.
62+
If not specified, the format is read from the `compression_format` setting in containers.conf.
63+
Cannot be used together with **--disable-compression**.
64+
65+
**--compression-level** *level*
66+
67+
Specifies the compression level to use. The value is specific to the compression algorithm used, e.g. for zstd the accepted values are in the range 1-20 (inclusive), while for gzip it is 1-9 (inclusive).
68+
If not specified, the level is read from the `compression_level` setting in containers.conf.
69+
5970
**--config** *filename*
6071

6172
Read a JSON-encoded version of an image configuration object from the specified
@@ -143,6 +154,7 @@ because image layers are compressed automatically when they are pushed to
143154
registries, and images being written to local storage would only need to be
144155
decompressed again to be stored. Compression can be forced in all cases by
145156
specifying **--disable-compression=false**.
157+
Cannot be used together with **--compression-format** or **--force-compression**.
146158

147159
**--encrypt-layer** *layer(s)*
148160

@@ -152,6 +164,11 @@ Layer(s) to encrypt: 0-indexed layer indices with support for negative indexing
152164

153165
The [protocol:keyfile] specifies the encryption protocol, which can be JWE (RFC7516), PGP (RFC4880), and PKCS7 (RFC2315) and the key material required for image encryption. For instance, jwe:/path/to/key.pem or pgp:admin@example.com or pkcs7:/path/to/x509-file.
154166

167+
**--force-compression**
168+
169+
If set, commit uses the specified compression algorithm even if the destination contains a differently-compressed variant already.
170+
Defaults to `true` if **--compression-format** is explicitly specified on the command-line or `compression_format` is set in containers.conf, `false` otherwise.
171+
155172
**--format**, **-f** *[oci | docker]*
156173

157174
Control the format for the image manifest and configuration data. Recognized

docs/buildah-push.1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ The default certificates directory is _/etc/containers/certs.d_.
4242

4343
Specifies the compression format to use. Supported values are: `gzip`, `zstd` and `zstd:chunked`.
4444
`zstd:chunked` is incompatible with encrypting images, and will be treated as `zstd` with a warning in that case.
45+
If not specified, the format is read from the `compression_format` setting in containers.conf.
4546

4647
**--compression-level** *level*
4748

48-
Specify the compression level used with the compression.
49-
5049
Specifies the compression level to use. The value is specific to the compression algorithm used, e.g. for zstd the accepted values are in the range 1-20 (inclusive), while for gzip it is 1-9 (inclusive).
50+
If not specified, the level is read from the `compression_level` setting in containers.conf.
5151

5252
**--creds** *creds*
5353

@@ -74,7 +74,7 @@ The [protocol:keyfile] specifies the encryption protocol, which can be JWE (RFC7
7474
**--force-compression**
7575

7676
If set, push uses the specified compression algorithm even if the destination contains a differently-compressed variant already.
77-
Defaults to `true` if `--compression-format` is explicitly specified on the command-line, `false` otherwise.
77+
Defaults to `true` if `--compression-format` is explicitly specified on the command-line or `compression_format` is set in containers.conf, `false` otherwise.
7878

7979
**--format**, **-f**
8080

0 commit comments

Comments
 (0)