github.com/stackdocker/rkt@v0.10.1-0.20151109095037-1aa827478248/Documentation/subcommands/image.md (about) 1 # rkt image 2 3 ## rkt image list 4 5 You can get a list of images in the local store with their keys, names and import times. 6 7 ``` 8 # rkt image list 9 ID NAME IMPORT TIME LATEST 10 sha512-91e98d7f1679 coreos.com/etcd:v2.0.9 6 days ago false 11 sha512-a03f6bad952b coreos.com/rkt/stage1:0.7.0 55 minutes ago false 12 ``` 13 14 A more detailed output can be had by adding the `--full` flag 15 16 ``` 17 ID NAME IMPORT TIME LATEST 18 sha512-b843248e28fa9132e23e1e763142049d17a61bab7873dff1e1ff105f9ddb2708 redis:latest 2015-09-17 13:27:04.24 +0200 CEST true 19 sha512-fb6b47cc9e7ee29f67422c6585c8f517c16e0e0ee9f4cf8b8cafd8e1c1d29233 redis:latest 2015-09-17 14:57:36.779 +0200 CEST true 20 ``` 21 22 ## rkt image rm 23 24 Given an image ID you can remove it from the local store. 25 26 ``` 27 # rkt image rm sha512-a03f6bad952b 28 rkt: successfully removed aci for image ID: "sha512-a03f6bad952b" 29 rkt: 1 image(s) successfully remove 30 ``` 31 32 ## rkt image gc 33 34 You can garbage collect the rkt store to clean up unused internal data and remove old images (this one to be implemented). 35 36 ``` 37 # rkt image gc 38 rkt: removed treestore "deps-sha512-120e20cf5c4588b9ed9727e9963f87cc587bec8f23e26fb607cb6adf6d3953f2" 39 ``` 40 41 42 ## rkt image export 43 44 There are cases where you might want to export the ACI from the store to copy to another machine, file server, etc. 45 46 ``` 47 # rkt image export coreos.com/etcd etcd.aci 48 $ tar xvf etcd.aci 49 ``` 50 51 NOTES: 52 - A matching image must be fetched before doing this operation, rkt will not attempt to download an image first, this subcommand will incur no-network I/O. 53 - The exported ACI file might be different than the original one because rkt image export always returns uncompressed ACIs. 54 55 56 ## rkt image extract/render 57 58 For debugging or inspection you may want to extract an ACI to a directory on disk. There are a few different options depending on your use case but the basic command looks like this: 59 60 ``` 61 # rkt image extract coreos.com/etcd etcd-extracted 62 # find etcd-extracted 63 etcd-extracted 64 etcd-extracted/manifest 65 etcd-extracted/rootfs 66 etcd-extracted/rootfs/etcd 67 etcd-extracted/rootfs/etcdctl 68 ... 69 ``` 70 71 NOTE: Like with rkt image export, a matching image must be fetched before doing this operation. 72 73 Now there are some flags that can be added to this: 74 75 To get just the rootfs use: 76 77 ``` 78 # rkt image extract --rootfs-only coreos.com/etcd etcd-extracted 79 # find etcd-extracted 80 etcd-extracted 81 etcd-extracted/etcd 82 etcd-extracted/etcdctl 83 ... 84 ``` 85 86 If you want the image rendered as it would look ready-to-run inside of the rkt stage2 then use `rkt image render`. NOTE: this will not use overlayfs or any other mechanism. This is to simplify the cleanup: to remove the extracted files you can run a simple `rm -Rf`. 87 88 ## rkt image cat-manifest 89 90 For debugging or inspection you may want to extract an ACI manifest to stdout. 91 92 ``` 93 # rkt image cat-manifest --pretty-print coreos.com/etcd 94 { 95 "acVersion": "0.7.0", 96 "acKind": "ImageManifest", 97 ... 98 ```