Merge pull request #1394 from isker/patch-1
Update README.md re: layer cache behavior
This commit is contained in:
		
						commit
						2a4ab62a08
					
				|  | @ -378,11 +378,13 @@ as a remote image destination: | ||||||
| ### Caching | ### Caching | ||||||
| 
 | 
 | ||||||
| #### Caching Layers | #### Caching Layers | ||||||
| kaniko can cache layers created by `RUN` commands in a remote repository. | kaniko can cache layers created by `RUN` and `COPY` commands in a remote repository. | ||||||
| Before executing a command, kaniko checks the cache for the layer. | Before executing a command, kaniko checks the cache for the layer. | ||||||
| If it exists, kaniko will pull and extract the cached layer instead of executing the command. | If it exists, kaniko will pull and extract the cached layer instead of executing the command. | ||||||
| If not, kaniko will execute the command and then push the newly created layer to the cache. | If not, kaniko will execute the command and then push the newly created layer to the cache. | ||||||
| 
 | 
 | ||||||
|  | Note that kaniko cannot read layers from the cache after a cache miss: once a layer has not been found in the cache, all subsequent layers are built locally without consulting the cache. | ||||||
|  | 
 | ||||||
| Users can opt into caching by setting the `--cache=true` flag. | Users can opt into caching by setting the `--cache=true` flag. | ||||||
| A remote repository for storing cached layers can be provided via the `--cache-repo` flag. | A remote repository for storing cached layers can be provided via the `--cache-repo` flag. | ||||||
| If this flag isn't provided, a cached repo will be inferred from the `--destination` provided. | If this flag isn't provided, a cached repo will be inferred from the `--destination` provided. | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue