Add container support
Change-Id: Ieaf282d880797e64e67d5220255886d057fe56ef
diff --git a/trellis/docker/entrypoint.sh b/trellis/docker/entrypoint.sh
new file mode 100755
index 0000000..481249f
--- /dev/null
+++ b/trellis/docker/entrypoint.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# Select topology to emulate
+TOPO=${TOPO:-trellis}
+ONOS_HOST=${ONOS_HOST:-localhost}
+
+# Resolve ONOS IP
+ONOS_IP=`getent hosts $ONOS_HOSTNAME | awk '{ print $1 }'`
+
+# Start and configure OVS
+# Avoid using Linux service since it will attempt but fail the kernel module check
+/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd --no-monitor --system-id=random start
+/usr/sbin/ovs-vswitchd --detach
+ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2
+
+# Push netcfg to ONOS
+cd routing/trellis
+echo ${ONOS_IP}
+head ${TOPO}.json
+onos-netcfg ${ONOS_IP} ${TOPO}.json
+
+# Start mininet
+./${TOPO}.py -c ${ONOS_IP}