Should not pass value of $PROCFS (close #622)

This is picked from squaremo/weave@d3cc606d5b

The environment variable `PROCFS` was originally added so that the script
could be run in a container. The host's /proc is bind-mounted as /hostproc,
and the script must be told this.

The remote weaving changes got this a bit wrong, by using the value of
`$PROCFS` in a "volume" mount argument (`-v`) to docker -- but when
invoking a container, the left-hand-side of the volume mount should
*always* be `/proc` (and the right-hand-side always `/hostproc`),
since it will always be binding the host's `/proc` to the container's
`/hostproc`.

The gist is that docker looks at host's root filesystem and if you
pass `-v /hostporc:/hostproc` when running from a container where
you have already bind-mounted it, it will end-up creating empty
directory in the target container as there is no `/hostproc` from
docker's perspective.
This commit is contained in:
Michael Bridgen authored and Ilya Dmitrichenko committed 2015-04-30 13:49:29 +01:00
1 parent 0fc0b9a671
commit d710684f8e
1 file changed
+1 -1
+1 -1
View File
@@ -44,7 +44,7 @@ usage() {
exec_remote() {
docker run --rm --privileged --net=host \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$PROCFS":/hostproc \
-v /proc:/hostproc \
-e PROCFS=/hostproc \
-e VERSION \
-e WEAVE_DOCKER_ARGS \