Compare commits

..

1 Commits

Author SHA1 Message Date
Shubham Agrawal 4612825d41 Allow remote caching of docker layers in kaniko build (#16) 2021-04-08 00:05:53 +05:30
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -101,7 +101,7 @@ func main() {
}, },
cli.StringFlag{ cli.StringFlag{
Name: "cache-repo", Name: "cache-repo",
Usage: "Remote repository that will be used to store cached layers. Cache repo should be present in specified registry. enable-cache needs to be set to use this flag", Usage: "Remote repository that will be used to store cached layers. enable-cache needs to be set to use this flag",
EnvVar: "PLUGIN_CACHE_REPO", EnvVar: "PLUGIN_CACHE_REPO",
}, },
cli.IntFlag{ cli.IntFlag{
@@ -133,7 +133,7 @@ func run(c *cli.Context) error {
Labels: c.StringSlice("custom-labels"), Labels: c.StringSlice("custom-labels"),
SnapshotMode: c.String("snapshot-mode"), SnapshotMode: c.String("snapshot-mode"),
EnableCache: c.Bool("enable-cache"), EnableCache: c.Bool("enable-cache"),
CacheRepo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("cache-repo")), CacheRepo: c.String("cache-repo"),
CacheTTL: c.Int("cache-ttl"), CacheTTL: c.Int("cache-ttl"),
}, },
} }
+2 -2
View File
@@ -97,7 +97,7 @@ func main() {
}, },
cli.StringFlag{ cli.StringFlag{
Name: "cache-repo", Name: "cache-repo",
Usage: "Remote repository that will be used to store cached layers. Cache repo should be present in specified registry. enable-cache needs to be set to use this flag", Usage: "Remote repository that will be used to store cached layers. enable-cache needs to be set to use this flag",
EnvVar: "PLUGIN_CACHE_REPO", EnvVar: "PLUGIN_CACHE_REPO",
}, },
cli.IntFlag{ cli.IntFlag{
@@ -133,7 +133,7 @@ func run(c *cli.Context) error {
Labels: c.StringSlice("custom-labels"), Labels: c.StringSlice("custom-labels"),
SnapshotMode: c.String("snapshot-mode"), SnapshotMode: c.String("snapshot-mode"),
EnableCache: c.Bool("enable-cache"), EnableCache: c.Bool("enable-cache"),
CacheRepo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("cache-repo")), CacheRepo: c.String("cache-repo"),
CacheTTL: c.Int("cache-ttl"), CacheTTL: c.Int("cache-ttl"),
}, },
} }