diff options
author | Aditya R <arajan@redhat.com> | 2022-08-09 09:10:55 +0530 |
---|---|---|
committer | Aditya R <arajan@redhat.com> | 2022-08-09 09:10:58 +0530 |
commit | 59cb410fe29d18d2e908762d80f3caf1cd5a41a4 (patch) | |
tree | f14728908cc5638ff5b7d50d838a3c38b496778d /pkg/bindings/images | |
parent | 7bd886480066ceb097ab5ab101738d6b4fca718f (diff) | |
download | podman-59cb410fe29d18d2e908762d80f3caf1cd5a41a4.tar.gz podman-59cb410fe29d18d2e908762d80f3caf1cd5a41a4.tar.bz2 podman-59cb410fe29d18d2e908762d80f3caf1cd5a41a4.zip |
build: implement --cache-to,--cache-from and --cache-ttl
[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]
Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r-- | pkg/bindings/images/build.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go index 6883585e2..2615bc516 100644 --- a/pkg/bindings/images/build.go +++ b/pkg/bindings/images/build.go @@ -224,6 +224,15 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO if len(options.Manifest) > 0 { params.Set("manifest", options.Manifest) } + if options.CacheFrom != nil { + params.Set("cachefrom", options.CacheFrom.String()) + } + if options.CacheTo != nil { + params.Set("cacheto", options.CacheTo.String()) + } + if int64(options.CacheTTL) != 0 { + params.Set("cachettl", options.CacheTTL.String()) + } if memSwap := options.CommonBuildOpts.MemorySwap; memSwap > 0 { params.Set("memswap", strconv.Itoa(int(memSwap))) } |