This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
Should not pass value of $PROCFS
(close #622)
#621
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is picked from squaremo/weave@d3cc606, hence @squaremo's authorship is preserved.
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.