1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Refine the volume mount example

The path here should be absolute, else it would
deem it as volume name.

Also link to release page to contain static binary,
the old link not work, because it is just used to
install docker in os distro, it can not be used
as static binary directly.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
This commit is contained in:
Kai Qiang Wu(Kennan) 2016-01-19 05:30:33 +00:00
parent cd1ed858d3
commit 9e3c1f2609

View file

@ -195,12 +195,13 @@ a container writes files. The `--read-only` flag mounts the container's root
filesystem as read only prohibiting writes to locations other than the filesystem as read only prohibiting writes to locations other than the
specified volumes for the container. specified volumes for the container.
$ docker run -t -i -v /var/run/docker.sock:/var/run/docker.sock -v ./static-docker:/usr/bin/docker busybox sh $ docker run -t -i -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/static-docker-binary:/usr/bin/docker busybox sh
By bind-mounting the docker unix socket and statically linked docker By bind-mounting the docker unix socket and statically linked docker
binary (such as that provided by [https://get.docker.com]( binary (refer to [get the linux binary](
https://get.docker.com)), you give the container the full access to create and ../../installation/binaries.md#get-the-linux-binary)),
manipulate the host's Docker daemon. you give the container the full access to create and manipulate the host's
Docker daemon.
### Publish or expose port (-p, --expose) ### Publish or expose port (-p, --expose)