github.com/stackdocker/rkt@v0.10.1-0.20151109095037-1aa827478248/Documentation/image-fetching-behavior.md (about) 1 # Image Fetching Behavior 2 3 When fetching, rkt will try to avoid unnecessary network transfers: if an updated image is already in the local store there's no need to download it again. 4 5 This behavior can be controlled with the `--store-only` and `--no-store` flags. 6 7 ## General Behavior 8 9 The following table describes the meaning of the `--store-only` and `--no-store` flags. 10 11 Flags | Description 12 ------------------------- | --------------------------------------------------------------------------------------------------- 13 _no flags_ | **Default behavior.** Do `store` and if it doesn't return an image do `remote`. 14 `--store-only` | Check the local store only. 15 `--no-store` | Execute a remote download, while handling caching logic for `http(s)://` and `docker://`. 16 `--store-only --no-store` | Invalid option. 17 18 ## Details 19 20 Here we detail the actions taken by rkt when fetching from store and remote for each type of image argument. 21 22 Fetch from | Image argument | Detailed behavior 23 ------------ | ------------------ | -------------------------------------------------------------------------------------------- 24 store | file:// | Use the specified file 25 store | http(s):// | Check for the URL in the local store. If found, use the corresponding image. 26 store | docker:// | Check for the URL in the local store. If found, use the corresponding image. 27 store | image name | Check local store. If found, use that image. If there's a file in the current directory named like the image name, use that file instead. 28 remote | file:// | Use the specified file 29 remote | http(s):// | Search in the store if the URL is available. If it's available and the saved Cache-Control maxage > 0 determine if the image should be downloaded. If it's not expired use the image. Otherwise download (sending if available the saved ETag). If the download returns a `304 Not Modified` use the image already saved in the local store. 30 remote | docker:// | Fetch using docker2aci. 31 remote | image name | Execute [discovery logic](https://github.com/appc/spec/blob/master/spec/discovery.md#app-container-image-discovery). If discovery is successful use the discovered URL doing the above `remote` http(s):// image case. If there's a file in the current directory named like the image name, use that file instead. 32