Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
start temporary containers without networking when possible
Browse files Browse the repository at this point in the history
This is more efficient and TRTTD

Closes #1572.
  • Loading branch information
rade committed Oct 21, 2015
1 parent 2357b69 commit 2ef9cc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions weave
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ ask_version() {
echo "Unable to find $2 image." >&2
fi
fi
[ -n "$DOCKERIMAGE" ] && docker run --rm -e WEAVE_CIDR=none $3 $DOCKERIMAGE $COVERAGE_ARGS --version
[ -n "$DOCKERIMAGE" ] && docker run --rm --net=none -e WEAVE_CIDR=none $3 $DOCKERIMAGE $COVERAGE_ARGS --version
}

router_opts_fastdp() {
Expand Down Expand Up @@ -1033,7 +1033,7 @@ rewrite_etc_hosts() {
CONTENTS="$(etc_hosts_contents $FQDN $@)"
# rewrite /etc/hosts, unlinking the file (so Docker does not modify it again) but
# leaving it with valid contents...
docker run --rm \
docker run --rm --net=none \
-v $CONTAINERS_PATH:$MNT \
--entrypoint=sh \
$EXEC_IMAGE -c "echo '$CONTENTS' > $MNT_HOSTS && rm -f $MNT_HOSTS && echo '$CONTENTS' > $MNT_HOSTS"
Expand Down Expand Up @@ -1521,7 +1521,7 @@ launch_proxy() {
# when launching the weaveproxy container.
docker_client_args $DOCKER_CLIENT_ARGS
proxy_args "$@"
HOSTS_PATH=$(docker run --rm \
HOSTS_PATH=$(docker run --rm --net=none \
-v /var/run/docker.sock:/var/run/docker.sock \
--entrypoint=/bin/sh \
$EXEC_IMAGE -c 'docker inspect -f {{.HostsPath}} $(hostname)')
Expand Down

0 comments on commit 2ef9cc6

Please sign in to comment.