We want to be compatible with whatever docker the user has; `weave run` is the only command that passes on arbitrary args to docker (i.e., that doesn't have a fixed set of docker features that it needs). To make this workable we still need to do some things on the remote host: the IP attachment and figuring out the DNS settings (since those may depend on the bridge IP).
20 lines
474 B
Bash
Executable File
20 lines
474 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. ./config.sh
|
|
|
|
start_suite "Run weave with --local"
|
|
|
|
run_on $HOST1 sudo ./weave --local reset
|
|
|
|
run_on $HOST1 sudo ./weave --local launch
|
|
assert_raises "docker_on $HOST1 ps | grep weave" 0
|
|
|
|
docker_on $HOST1 rm -f c1 || true
|
|
run_on $HOST1 sudo ./weave --local run 10.2.6.5/24 -ti --name=c1 ubuntu
|
|
ok=$(docker -H tcp://$HOST1:2375 exec -i c1 sh -c "ifconfig | grep ethwe")
|
|
assert "test -n \"$ok\" && echo pass" "pass"
|
|
|
|
docker_on $HOST1 rm -f c1 || true
|
|
|
|
end_suite
|