add docker-compose example
diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile
index c40af0a..31da835 100755
--- a/utils/docker/Dockerfile
+++ b/utils/docker/Dockerfile
@@ -34,17 +34,19 @@
 
 RUN apt-get clean
 
-RUN cd /son-emu/ansible \
-    && ansible-playbook install.yml \
-    && cd /son-emu \
-    # we need to reset the __pycache__ for correct test discovery
-    && rm -rf src/emuvim/test/__pycache__ \
-    && rm -rf src/emuvim/test/unittests/__pycache__ \
-    && rm -rf src/emuvim/test/integrationtests/__pycache__ \
-    && python setup.py install \
-    && echo 'Done'
+WORKDIR /son-emu/ansible
+RUN ansible-playbook install.yml
+
+WORKDIR /son-emu
+# we need to reset the __pycache__ for correct test discovery
+RUN rm -rf src/emuvim/test/__pycache__ 
+RUN rm -rf src/emuvim/test/unittests/__pycache__ 
+RUN rm -rf src/emuvim/test/integrationtests/__pycache__ 
+RUN python setup.py install 
+RUN echo 'Done'
+
 
 ENTRYPOINT ["/son-emu/utils/docker/entrypoint.sh"]
 
-# dummy GK, zerorpc, DCNetwork zerorpc, cAdvisor
-EXPOSE 5000 4242 5151 8090
+# dummy GK, zerorpc, DCNetwork zerorpc, cAdvisor, restAPI
+EXPOSE 5000 4242 5151 8090 5001
diff --git a/utils/docker/docker-compose_son-emu.yml b/utils/docker/docker-compose_son-emu.yml
new file mode 100755
index 0000000..4e39e32
--- /dev/null
+++ b/utils/docker/docker-compose_son-emu.yml
@@ -0,0 +1,19 @@
+version: '2'
+services:
+
+  son-emu:
+    image: registry.sonata-nfv.eu:5000/son-emu
+    container_name: son-emu
+    volumes:
+     - "/var/run/docker.sock:/var/run/docker.sock"
+    network_mode: "host"
+    pid: "host"
+    privileged: true
+    ports:
+     #REST api
+     - "5001:5001"
+    entrypoint: 
+     - "/son-emu/utils/ci/entrypoint_docker-compose.sh"
+    command: [python, src/emuvim/examples/son-monitor_default_topo.py]
+
+
diff --git a/utils/docker/entrypoint.sh b/utils/docker/entrypoint.sh
index 1820515..4349efd 100755
--- a/utils/docker/entrypoint.sh
+++ b/utils/docker/entrypoint.sh
@@ -6,7 +6,7 @@
 
 # this cannot be done from the Dockerfile since we have the socket not mounted during build
 # this image is needed for the monitoring in son-emu
-echo 'Pulling the "google/cadvisor" image ... please wait'
-docker pull 'google/cadvisor'
+#echo 'Pulling the "google/cadvisor" image ... please wait'
+#docker pull 'google/cadvisor'
 
 exec /containernet/util/docker/entrypoint.sh $*
diff --git a/utils/docker/entrypoint_docker-compose.sh b/utils/docker/entrypoint_docker-compose.sh
new file mode 100755
index 0000000..421444e
--- /dev/null
+++ b/utils/docker/entrypoint_docker-compose.sh
@@ -0,0 +1,68 @@
+#! /bin/bash -e
+
+# docker stop trap signals
+# https://medium.com/@gchudnov/trapping-signals-in-docker-containers-7a57fdda7d86#.5d6q01x7q
+
+pid=0
+command=""
+term_recvd=0
+
+# send SIGTERM also to the executed command in the docker container (the containernet topology)
+# SIGTERM-handler
+function term_handler() { 
+  echo $command	
+  pid=$(pgrep -f "$command" | sed -n 1p)
+
+  pid="$!"
+  # avoid that the process triggers its own handler by sending sigterm
+  if [ $pid -ne 0 ] && [ $term_recvd -eq 0 ]; then
+    echo "sigterm received"
+    echo $pid	
+    term_recvd=1
+    kill -SIGTERM "$pid"  
+  fi
+
+  wait "$pid"
+
+  # do some manual cleanup
+  # remove all containers started by son-emu
+  docker ps -a -q --filter="name=mn.*" | xargs -r docker rm -f
+  # cleanup remaining mininet
+  mn -c
+
+  sleep 5
+  exit 143; # 128 + 15 -- SIGTERM
+}
+
+# setup handlers
+# on callback, kill the last background process, which is `tail -f /dev/null` and execute the specified handler
+trap 'term_handler' SIGTERM
+
+
+service openvswitch-switch start
+
+if [ ! -S /var/run/docker.sock ]; then
+    echo 'Error: the Docker socket file "/var/run/docker.sock" was not found. It should be mounted as a volume.'
+    exit 1
+fi
+
+# this cannot be done from the Dockerfile since we have the socket not mounted during build
+echo 'Pulling the "ubuntu:trusty" image ... please wait'
+docker pull 'ubuntu:trusty'
+
+echo "Welcome to Containernet running within a Docker container ..."
+
+if [[ $# -eq 0 ]]; then
+    exec /bin/bash
+else
+    #remember command to send it also the SIGTERM via the handler
+    command=$*
+    echo $command	
+    exec $* &
+    # wait indefinetely
+    while true
+    do
+      sleep 1
+    done
+    echo "done"
+fi