Fix double single dash arg issues in docs
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
This commit is contained in:
parent
56c156190a
commit
fbd6fee4ab
|
@ -63,7 +63,7 @@ For Docker containers using cgroups, the container name will be the
|
||||||
full ID or long ID of the container. If a container shows up as
|
full ID or long ID of the container. If a container shows up as
|
||||||
ae836c95b4c3 in ``docker ps``, its long ID might be something like
|
ae836c95b4c3 in ``docker ps``, its long ID might be something like
|
||||||
``ae836c95b4c3c9e9179e0e91015512da89fdec91612f63cebae57df9a5444c79``. You
|
``ae836c95b4c3c9e9179e0e91015512da89fdec91612f63cebae57df9a5444c79``. You
|
||||||
can look it up with ``docker inspect`` or ``docker ps -notrunc``.
|
can look it up with ``docker inspect`` or ``docker ps --no-trunc``.
|
||||||
|
|
||||||
Putting everything together to look at the memory metrics for a Docker
|
Putting everything together to look at the memory metrics for a Docker
|
||||||
container, take a look at ``/sys/fs/cgroup/memory/lxc/<longid>/``.
|
container, take a look at ``/sys/fs/cgroup/memory/lxc/<longid>/``.
|
||||||
|
|
|
@ -37,7 +37,7 @@ And run the PostgreSQL server container (in the foreground):
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ sudo docker run --rm -P -name pg_test eg_postgresql
|
$ sudo docker run --rm -P --name pg_test eg_postgresql
|
||||||
|
|
||||||
There are 2 ways to connect to the PostgreSQL server. We can use
|
There are 2 ways to connect to the PostgreSQL server. We can use
|
||||||
:ref:`working_with_links_names`, or we can access it from our host (or the network).
|
:ref:`working_with_links_names`, or we can access it from our host (or the network).
|
||||||
|
|
|
@ -129,7 +129,7 @@ because they are external to images.
|
||||||
Instead you can use ``--volumes-from`` to start a new container that can access the
|
Instead you can use ``--volumes-from`` to start a new container that can access the
|
||||||
data-container's volume. For example::
|
data-container's volume. For example::
|
||||||
|
|
||||||
$ sudo docker run -rm --volumes-from DATA -v $(pwd):/backup busybox tar cvf /backup/backup.tar /data
|
$ sudo docker run --rm --volumes-from DATA -v $(pwd):/backup busybox tar cvf /backup/backup.tar /data
|
||||||
|
|
||||||
* ``--rm`` - remove the container when it exits
|
* ``--rm`` - remove the container when it exits
|
||||||
* ``--volumes-from DATA`` - attach to the volumes shared by the ``DATA`` container
|
* ``--volumes-from DATA`` - attach to the volumes shared by the ``DATA`` container
|
||||||
|
@ -140,7 +140,7 @@ data-container's volume. For example::
|
||||||
Then to restore to the same container, or another that you've made elsewhere::
|
Then to restore to the same container, or another that you've made elsewhere::
|
||||||
|
|
||||||
# create a new data container
|
# create a new data container
|
||||||
$ sudo docker run -v /data -name DATA2 busybox true
|
$ sudo docker run -v /data --name DATA2 busybox true
|
||||||
# untar the backup files into the new container's data volume
|
# untar the backup files into the new container's data volume
|
||||||
$ sudo docker run --rm --volumes-from DATA2 -v $(pwd):/backup busybox tar xvf /backup/backup.tar
|
$ sudo docker run --rm --volumes-from DATA2 -v $(pwd):/backup busybox tar xvf /backup/backup.tar
|
||||||
data/
|
data/
|
||||||
|
|
Loading…
Reference in New Issue