attach command that accepts and existing container id and runs configure_container_networking using it

This commit is contained in:
Kai Davenport committed 2014-09-15 10:25:59 -07:00
1 parent 2e66694355
commit 5490826666
1 file changed
+9
+9
View File
@@ -5,6 +5,7 @@ usage() {
echo "Usage:"
echo "weave launch <ipaddr>/<subnet> [-passwd <passwd>] <peer_host> ..."
echo "weave run <ipaddr>/<subnet> <docker run args> ..."
echo "weave attach <ipaddr>/<subnet> <containerid> ..."
echo "weave expose <ipaddr>/<subnet>"
echo "weave hide <ipaddr>/<subnet>"
echo "weave status"
@@ -205,6 +206,14 @@ case "$COMMAND" in
configure_container_networking $CONTAINER $IPADDR $CONTAINER_IFNAME
echo $CONTAINER
;;
attach)
[ $# -gt 1 ] || usage
IPADDR=$1
shift 1
CONTAINER=$1
shift 1
configure_container_networking $CONTAINER $IPADDR $CONTAINER_IFNAME
;;
expose)
[ $# -gt 0 ] || usage
IPADDR=$1