Add volume documentation.
parent
3b1d8c6ba7
commit
5ee1e502b8
|
@ -484,3 +484,17 @@ allowing the image directory structure to be preserved;
|
|||
this would be useful for application paths that
|
||||
use directories to store runtime state,
|
||||
such as ``/var/lib/nginx`` for ``nginx``.
|
||||
|
||||
|
||||
Volumes: ``volumes``
|
||||
====================
|
||||
|
||||
Paths in the image that should be mounted read write into the container
|
||||
from user defined directories.
|
||||
|
||||
This is used for read-only containers to
|
||||
write out data that should be persisted, such as ``postgres`` data.
|
||||
|
||||
If a volume is not defined during container creation,
|
||||
``sponson`` creates a directory for the volume
|
||||
to ensure the container works as expected.
|
||||
|
|
|
@ -31,7 +31,7 @@ new
|
|||
|
||||
.. code::
|
||||
|
||||
sponson container new [--version <image version>] [--readwrite] <image name> <new container name>
|
||||
sponson container new [--version <image version>] [--volume <volume name>:<volume source path>]* [--readwrite] <image name> <new container name>
|
||||
|
||||
|
||||
Create a new container based on the provided image name.
|
||||
|
@ -41,6 +41,11 @@ The container name must be unique.
|
|||
The latest version of the image is used as a base for the container,
|
||||
unless ``--version`` provides a specific version.
|
||||
|
||||
Volumes can be defined for this container using the ``--volume`` option.
|
||||
The argument should be of the form ``<volume name>:<volume source path>``.
|
||||
|
||||
``--volume`` can be defined multiple times for each volume in the container.
|
||||
|
||||
Containers are by default read-only,
|
||||
however if ``--readwrite`` is specified the container is writable,
|
||||
and any changes made by the container are stored in
|
||||
|
|
Loading…
Reference in New Issue