Altered the build process for the portainer container to make it more
compatible with older docker releases. Old releases would complain that
the options -d and --rm were incompatible. Also altered the way the
proxy behaves to minimize upstream re-writes, this was moved to the
container build process.

Change-Id: I5c897ed02e556201d7e3ba0d30616ed31938bac6
diff --git a/portainer/buildPortainer.sh b/portainer/buildPortainer.sh
index 36a2707..dc0b002 100755
--- a/portainer/buildPortainer.sh
+++ b/portainer/buildPortainer.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-docker run --rm -d --name pbuild -p 9999:9000 portainer/portainer
+docker run -d --name pbuild -p 9999:9000 portainer/portainer
 rm -fr tmp_portainer
 mkdir tmp_portainer
 docker cp pbuild:/ tmp_portainer
@@ -13,9 +13,16 @@
 s~constant("ENDPOINTS_ENDPOINT","api/endpoints")~constant("ENDPOINTS_ENDPOINT","docker/api/endpoints")~
 s~constant("TEMPLATES_ENDPOINT","api/templates")~constant("TEMPLATES_ENDPOINT","docker/api/templates")~
 ' tmp_portainer/js/app.*.js
-
+sed -i -e '
+s~href="~href="docker/~
+s~href='\''~href='\''docker/~
+s~src="~src="docker/~
+s~src='\''~src='\''docker/~
+s~"images/logo.png"~"docker/images/logo.png"~
+' tmp_portainer/index.html
 
 docker build -t voltha/portainer -f docker/Dockerfile.portainer .
 rm -fr tmp_portainer
 docker stop pbuild
+docker rm -f pbuild