From 9b0a1fa75293fbad724c34f54e3efb1cb56d7683 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Mon, 8 Aug 2022 11:58:31 +0530 Subject: build: implement --cache-to,--cache-from and --cache-ttl [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R --- docs/source/markdown/podman-build.1.md | 39 ++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/source/markdown/podman-build.1.md b/docs/source/markdown/podman-build.1.md index ba7081ff5..a5011f4aa 100644 --- a/docs/source/markdown/podman-build.1.md +++ b/docs/source/markdown/podman-build.1.md @@ -120,8 +120,43 @@ The value of [name] is matched with the following priority order: #### **--cache-from** -Images to utilize as potential cache sources. Podman does not currently support -caching so this is a NOOP. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) +Repository to utilize as a potential cache source. When specified, Buildah will try to look for +cache images in the specified repository and will attempt to pull cache images instead of actually +executing the build steps locally. Buildah will only attempt to pull previously cached images if they +are considered as valid cache hits. + +Use the `--cache-to` option to populate a remote repository with cache content. + +Example + +```bash +# populate a cache and also consult it +buildah build -t test --layers --cache-to registry/myrepo/cache --cache-from registry/myrepo/cache . +``` + +Note: `--cache-from` option is ignored unless `--layers` is specified. + +#### **--cache-to** + +Set this flag to specify a remote repository that will be used to store cache images. Buildah will attempt to +push newly built cache image to the remote repository. + +Note: Use the `--cache-from` option in order to use cache content in a remote repository. + +Example + +```bash +# populate a cache and also consult it +buildah build -t test --layers --cache-to registry/myrepo/cache --cache-from registry/myrepo/cache . +``` + +Note: `--cache-to` option is ignored unless `--layers` is specified. + +#### **--cache-ttl** + +Limit the use of cached images to only consider images with created timestamps less than *duration* ago. +For example if `--cache-ttl=1h` is specified, Buildah will only consider intermediate cache images which are created +under the duration of one hour, and intermediate cache images outside this duration will be ignored. #### **--cap-add**=*CAP\_xxx* -- cgit v1.2.3-54-g00ecf From 54ee42331aa3a986c786832ea2c50dfcb22a7106 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 30 Jul 2022 19:02:14 +0000 Subject: man podman-volume-import: Clarify that merge happens Current directories and files stay the same with the current implementation as long as the tarball does not contain a directories or files with the same name. Signed-off-by: Felix Stupp --- docs/source/markdown/podman-volume-import.1.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/source/markdown/podman-volume-import.1.md b/docs/source/markdown/podman-volume-import.1.md index 4ae9ae1e2..4df250e95 100644 --- a/docs/source/markdown/podman-volume-import.1.md +++ b/docs/source/markdown/podman-volume-import.1.md @@ -9,6 +9,7 @@ podman\-volume\-import - Import tarball contents into an existing podman volume ## DESCRIPTION **podman volume import** imports the contents of a tarball into the podman volume's mount point. +The contents of the volume will be merged with the content of the tarball, the latter takes precedence. **podman volume import** can consume piped input when using `-` as source path. The given volume must already exist and will not be created by podman volume import. -- cgit v1.2.3-54-g00ecf From 6b2bbd2d195c48d3cafeb0f731660c76aa4131b2 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 31 Jul 2022 20:34:14 +0000 Subject: podman-volume-import: Reword "precendence" Signed-off-by: Felix Stupp --- docs/source/markdown/podman-volume-import.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/source/markdown/podman-volume-import.1.md b/docs/source/markdown/podman-volume-import.1.md index 4df250e95..ec5d5ebfc 100644 --- a/docs/source/markdown/podman-volume-import.1.md +++ b/docs/source/markdown/podman-volume-import.1.md @@ -9,7 +9,7 @@ podman\-volume\-import - Import tarball contents into an existing podman volume ## DESCRIPTION **podman volume import** imports the contents of a tarball into the podman volume's mount point. -The contents of the volume will be merged with the content of the tarball, the latter takes precedence. +The contents of the volume will be merged with the content of the tarball with the latter taking precedence. **podman volume import** can consume piped input when using `-` as source path. The given volume must already exist and will not be created by podman volume import. -- cgit v1.2.3-54-g00ecf From e776425e5683e9cf85bfa0da092df1d5d45de9bd Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 4 Aug 2022 13:13:26 +0200 Subject: podman info: hide `--debug` It's a NOP since Podman v2.0 (#5738). [NO NEW TESTS NEEDED] - does not change behavior. Fixes: #15185 Signed-off-by: Valentin Rothberg --- cmd/podman/system/info.go | 1 + docs/source/markdown/podman-info.1.md | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'docs') diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go index f8fd946cd..296fa4def 100644 --- a/cmd/podman/system/info.go +++ b/cmd/podman/system/info.go @@ -63,6 +63,7 @@ func infoFlags(cmd *cobra.Command) { flags := cmd.Flags() flags.BoolVarP(&debug, "debug", "D", false, "Display additional debug information") + _ = flags.MarkHidden("debug") // It's a NOP since Podman version 2.0 formatFlagName := "format" flags.StringVarP(&inFormat, formatFlagName, "f", "", "Change the output format to JSON or a Go template") diff --git a/docs/source/markdown/podman-info.1.md b/docs/source/markdown/podman-info.1.md index 347d8d27b..fc7e1f0e2 100644 --- a/docs/source/markdown/podman-info.1.md +++ b/docs/source/markdown/podman-info.1.md @@ -15,10 +15,6 @@ Displays information pertinent to the host, current storage stats, configured co ## OPTIONS -#### **--debug**, **-D** - -Show additional information - #### **--format**, **-f**=*format* Change output format to "json" or a Go template. -- cgit v1.2.3-54-g00ecf From 4900394c8f1802891542fe6075cedffeff7cad5d Mon Sep 17 00:00:00 2001 From: Tomas Volf Date: Wed, 3 Aug 2022 12:24:38 +0200 Subject: Document behavior of --timestamp when only FROM is used Fixes: #15171 Signed-off-by: Tomas Volf --- docs/source/markdown/podman-build.1.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/source/markdown/podman-build.1.md b/docs/source/markdown/podman-build.1.md index a5011f4aa..bfdfee1ed 100644 --- a/docs/source/markdown/podman-build.1.md +++ b/docs/source/markdown/podman-build.1.md @@ -729,6 +729,8 @@ specified and therefore not changed, allowing the image's sha256 hash to remain same. All files committed to the layers of the image will be created with the timestamp. +If the only instruction in a Containerfile is `FROM`, this flag has no effect. + #### **--tls-verify** Require HTTPS and verify certificates when talking to container registries -- cgit v1.2.3-54-g00ecf