.nh .SH containers-storage 1 "August 2016" .SH NAME .PP containers-storage - Manage layer/image/container storage .SH SYNOPSIS .PP \fBcontainers-storage\fP [\fBsubcommand\fP] [\fB--help\fP] .SH DESCRIPTION .PP The \fIcontainers-storage\fP command is a front-end for the \fIcontainers/storage\fP library. While it can be used to manage storage for filesystem layers, images, and containers directly, its main use cases are centered around troubleshooting and querying the state of storage which is being managed by other processes. .PP Notionally, a complete filesystem layer is composed of a container filesystem and some bookkeeping information. Other layers, \fIchildren\fP of that layer, default to sharing its contents, but any changes made to the contents of the children are not reflected in the \fIparent\fP\&. This arrangement is intended to save disk space: by storing the \fIchild\fP layer only as a set of changes relative to its \fIparent\fP, the \fIparent\fP\&'s contents should not need to be duplicated for each of the \fIparent\fP\&'s \fIchildren\fP\&. Of course, each \fIchild\fP can have its own \fIchildren\fP\&. The contents of \fIparent\fP layers should not be modified. .PP An \fIimage\fP is a reference to a particular \fIlayer\fP, along with some bookkeeping information. Presumably, the \fIimage\fP points to a \fIlayer\fP which has been modified, possibly in multiple steps, from some general-purpose \fIparent\fP, so that it is suitable for running an intended application. Multiple \fIimages\fP can reference a single \fIlayer\fP, while differing only in the additional bookkeeping information that they carry. The contents of \fIimages\fP should be considered read-only. .PP A \fIcontainer\fP is essentially a \fIlayer\fP which is a \fIchild\fP of a \fIlayer\fP which is referred to by an \fIimage\fP (put another way, a \fIcontainer\fP is instantiated from an \fIimage\fP), along with some bookkeeping information. They do not have \fIchildren\fP and their \fIlayers\fP can not be directly referred to by \fIimages\fP\&. This ensures that changes to the contents of a \fIcontainer\fP\&'s layer do not affect other \fIimages\fP or \fIlayers\fP, so they are considered writeable. .PP All of \fIlayers\fP, \fIimages\fP, and \fIcontainers\fP can have metadata which \fIcontainers-storage\fP manages attached to them. Generally this metadata is not expected to be large, as it is cached in memory. .PP \fIImages\fP and \fIcontainers\fP can also have arbitrarily-named data items attached to them. Generally, this data can be larger than metadata, and is not kept in memory unless it is being retrieved or written. .PP It is expected that signatures which can be used to verify an \fIimage\fP\&'s contents will be stored as data items for that \fIimage\fP, along with any template configuration data which is recommended for use in \fIcontainers\fP which derive from the \fIimage\fP\&. It is also expected that a \fIcontainer\fP\&'s run-time configuration will be stored as data items. .SH SUB-COMMANDS .PP The \fIcontainers-storage\fP command's features are broken down into several subcommands: \fBcontainers-storage add-names(1)\fP Add layer, image, or container name or names .PP \fBcontainers-storage applydiff(1)\fP Apply a diff to a layer .PP \fBcontainers-storage applydiff-using-staging-dir(1)\fP Apply a diff to a layer staging the new content first. .PP \fBcontainers-storage changes(1)\fP Compare two layers .PP \fBcontainers-storage check(1)\fP Check for and possibly remove damaged layers/images/containers .PP \fBcontainers-storage container(1)\fP Examine a container .PP \fBcontainers-storage containers(1)\fP List containers .PP \fBcontainers-storage create-container(1)\fP Create a new container from an image .PP \fBcontainers-storage create-image(1)\fP Create a new image using layers .PP \fBcontainers-storage create-layer(1)\fP Create a new layer .PP \fBcontainers-storage create-storage-layer(1)\fP Create a new layer in the lower-level storage driver .PP \fBcontainers-storage delete(1)\fP Delete a layer or image or container, with no safety checks .PP \fBcontainers-storage delete-container(1)\fP Delete a container, with safety checks .PP \fBcontainers-storage delete-image(1)\fP Delete an image, with safety checks .PP \fBcontainers-storage delete-layer(1)\fP Delete a layer, with safety checks .PP \fBcontainers-storage diff(1)\fP Compare two layers .PP \fBcontainers-storage diffsize(1)\fP Compare two layers .PP \fBcontainers-storage exists(1)\fP Check if a layer or image or container exists .PP \fBcontainers-storage get-container-data(1)\fP Get data that is attached to a container .PP \fBcontainers-storage get-image-data(1)\fP Get data that is attached to an image .PP \fBcontainers-storage image(1)\fP Examine an image .PP \fBcontainers-storage images(1)\fP List images .PP \fBcontainers-storage layers(1)\fP List layers .PP \fBcontainers-storage list-container-data(1)\fP List data items that are attached to a container .PP \fBcontainers-storage list-image-data(1)\fP List data items that are attached to an image .PP \fBcontainers-storage metadata(1)\fP Retrieve layer, image, or container metadata .PP \fBcontainers-storage mount(1)\fP Mount a layer or container .PP \fBcontainers-storage mounted(1)\fP Check if a file system is mounted .PP \fBcontainers-storage set-container-data(1)\fP Set data that is attached to a container .PP \fBcontainers-storage set-image-data(1)\fP Set data that is attached to an image .PP \fBcontainers-storage set-metadata(1)\fP Set layer, image, or container metadata .PP \fBcontainers-storage set-names(1)\fP Set layer, image, or container name or names .PP \fBcontainers-storage shutdown(1)\fP Shut down graph driver .PP \fBcontainers-storage status(1)\fP Check on graph driver status .PP \fBcontainers-storage unmount(1)\fP Unmount a layer or container .PP \fBcontainers-storage unshare(1)\fP Run a command in a user namespace .PP \fBcontainers-storage version(1)\fP Return containers-storage version information .PP \fBcontainers-storage wipe(1)\fP Wipe all layers, images, and containers .SH OPTIONS .PP \fB--help\fP .PP Print the list of available sub-commands. When a sub-command is specified, provide information about that command. .PP \fB--debug, -D\fP .PP Increases the amount of debugging information which is printed. .PP \fB--graph, -g=/var/lib/containers/storage\fP .PP Overrides the root of the storage tree, used for storing layer contents and information about layers, images, and containers. .PP \fB--run, -R=/run/containers/storage\fP .PP Overrides the root of the runtime state tree, currently used mainly for noting the location where a given layer is mounted (see \fBcontainers-storage mount\fP) so that it can be unmounted by path name as an alternative to unmounting by ID or name. .PP \fB--storage-driver, -s\fP .PP Specifies which storage driver to use. If not set, but \fI$STORAGE_DRIVER\fP is set in the environment, its value is used. If the storage tree has previously been initialized, neither needs to be provided. If the tree has not previously been initialized and neither is set, a hard-coded default is selected. .PP \fB--storage-opt=[]\fP .PP Set options which will be passed to the storage driver. If not set, but \fI$STORAGE_OPTS\fP is set in the environment, its value is treated as a comma-separated list and used instead. If the storage tree has previously been initialized, these need not be provided. .PP \fB--unshare, -U\fP .PP When started by a non-root user, run inside of a new user namespace configured using the system's default ID mappings for the non-root user. .SH ENVIRONMENT OVERRIDES .PP \fBCONTAINERS_STORAGE_CONF\fP .PP If set will use the configuration file path provided in \fI$CONTAINERS_STORAGE_CONF\fP instead of the default \fB/etc/containers/storage.conf\fR\&. .SH EXAMPLES .PP \fBcontainers-storage layers -t\fP .SH BUGS .PP This is still a work in progress, so some functionality may not yet be implemented, and some will be removed if it is found to be unnecessary. That said, if anything isn't working correctly, please report it to the project's issue tracker \[la]https://github.com/containers/storage/issues\[ra]\&. .SH FOOTNOTES .PP The Containers Storage project is committed to inclusivity, a core value of open source. The \fBmaster\fR and \fBslave\fR mount propagation terminology is used in this repository. This language is problematic and divisive, and should be changed. However, these terms are currently used within the Linux kernel and must be used as-is at this time. When the kernel maintainers rectify this usage, Containers Storage will follow suit immediately.