浏览代码

Merge pull request #2719 from metalivedev/2702-knownissue-lxc-start-failed-to-mount

Fixes #2702. Also cleans up formatting and long lines in volumes doc.
Andy Rothfusz 11 年之前
父节点
当前提交
1de02a70de
共有 2 个文件被更改,包括 36 次插入13 次删除
  1. 7 0
      docs/sources/commandline/cli.rst
  2. 29 13
      docs/sources/use/working_with_volumes.rst

+ 7 - 0
docs/sources/commandline/cli.rst

@@ -845,6 +845,13 @@ id may be optionally suffixed with ``:ro`` or ``:rw`` to mount the volumes in
 read-only or read-write mode, respectively. By default, the volumes are mounted
 in the same mode (rw or ro) as the reference container.
 
+Known Issues (run -volumes-from)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* :issue:`2702`: "lxc-start: Permission denied - failed to mount"
+  could indicate a permissions problem with AppArmor. Please see the
+  issue for a workaround.
+
 .. _cli_search:
 
 ``search``

+ 29 - 13
docs/sources/use/working_with_volumes.rst

@@ -30,44 +30,60 @@ Each container can have zero or more data volumes.
 Getting Started
 ...............
 
-
-
-Using data volumes is as simple as adding a new flag: ``-v``. The parameter ``-v`` can be used more than once in order to create more volumes within the new container. The example below shows the instruction to create a container with two new volumes::
+Using data volumes is as simple as adding a new flag: ``-v``. The
+parameter ``-v`` can be used more than once in order to create more
+volumes within the new container. The example below shows the
+instruction to create a container with two new volumes::
 
   docker run -v /var/volume1 -v /var/volume2 shykes/couchdb
 
-For a Dockerfile, the VOLUME instruction will add one or more new volumes to any container created from the image::
+For a Dockerfile, the VOLUME instruction will add one or more new
+volumes to any container created from the image::
 
   VOLUME ["/var/volume1", "/var/volume2"]
 
 
-Create a new container using existing volumes from an existing container:
----------------------------------------------------------------------------
-
+Mount Volumes from an Existing Container:
+-----------------------------------------
 
-The command below creates a new container which is running as daemon ``-d`` and with one volume ``/var/lib/couchdb``::
+The command below creates a new container which is runnning as daemon
+``-d`` and with one volume ``/var/lib/couchdb``::
 
   COUCH1=$(sudo docker run -d -v /var/lib/couchdb shykes/couchdb:2013-05-03)
 
-From the container id of that previous container ``$COUCH1`` it's possible to create new container sharing the same volume using the parameter ``-volumes-from container_id``::
+From the container id of that previous container ``$COUCH1`` it's
+possible to create new container sharing the same volume using the
+parameter ``-volumes-from container_id``::
 
   COUCH2=$(sudo docker run -d -volumes-from $COUCH1 shykes/couchdb:2013-05-03)
 
 Now, the second container has the all the information from the first volume.
 
 
-Create a new container which mounts a host directory into it:
--------------------------------------------------------------
+Mount a Host Directory as a Container Volume:
+---------------------------------------------
+
+::
 
   -v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro].
   If "host-dir" is missing, then docker creates a new volume.
 
-  This is not available for a Dockerfile due the portability and sharing purpose of it. The [host-dir] volumes is something    100% host dependent and will break on any other machine.
+This is not available for a Dockerfile due the portability and sharing
+purpose of it. The [host-dir] volumes is something 100% host dependent
+and will break on any other machine.
 
 For example::
 
   sudo docker run -v /var/logs:/var/host_logs:ro shykes/couchdb:2013-05-03
 
-The command above mounts the host directory ``/var/logs`` into the container with read only permissions as ``/var/host_logs``.
+The command above mounts the host directory ``/var/logs`` into the
+container with read only permissions as ``/var/host_logs``.
 
 .. versionadded:: v0.5.0
+
+Known Issues
+............
+
+* :issue:`2702`: "lxc-start: Permission denied - failed to mount"
+  could indicate a permissions problem with AppArmor. Please see the
+  issue for a workaround.