Sergio Slobodrian | 4d30710 | 2017-04-24 10:19:00 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Sergio Slobodrian | 7d7bb96 | 2017-05-04 09:54:39 -0400 | [diff] [blame] | 3 | docker run -d --name pbuild -p 9999:9000 portainer/portainer |
Sergio Slobodrian | 4d30710 | 2017-04-24 10:19:00 -0400 | [diff] [blame] | 4 | rm -fr tmp_portainer |
| 5 | mkdir tmp_portainer |
| 6 | docker cp pbuild:/ tmp_portainer |
| 7 | |
| 8 | sed -i -e ' |
| 9 | s~constant("DOCKER_ENDPOINT","api/docker")~constant("DOCKER_ENDPOINT","docker/api/docker")~ |
| 10 | s~constant("CONFIG_ENDPOINT","api/settings")~constant("CONFIG_ENDPOINT","docker/api/settings")~ |
| 11 | s~constant("AUTH_ENDPOINT","api/auth")~constant("AUTH_ENDPOINT","docker/api/auth")~ |
| 12 | s~constant("USERS_ENDPOINT","api/users")~constant("USERS_ENDPOINT","docker/api/users")~ |
| 13 | s~constant("ENDPOINTS_ENDPOINT","api/endpoints")~constant("ENDPOINTS_ENDPOINT","docker/api/endpoints")~ |
| 14 | s~constant("TEMPLATES_ENDPOINT","api/templates")~constant("TEMPLATES_ENDPOINT","docker/api/templates")~ |
| 15 | ' tmp_portainer/js/app.*.js |
Sergio Slobodrian | 7d7bb96 | 2017-05-04 09:54:39 -0400 | [diff] [blame] | 16 | sed -i -e ' |
| 17 | s~href="~href="docker/~ |
| 18 | s~href='\''~href='\''docker/~ |
| 19 | s~src="~src="docker/~ |
| 20 | s~src='\''~src='\''docker/~ |
| 21 | s~"images/logo.png"~"docker/images/logo.png"~ |
| 22 | ' tmp_portainer/index.html |
Sergio Slobodrian | 4d30710 | 2017-04-24 10:19:00 -0400 | [diff] [blame] | 23 | |
| 24 | docker build -t voltha/portainer -f docker/Dockerfile.portainer . |
| 25 | rm -fr tmp_portainer |
| 26 | docker stop pbuild |
Sergio Slobodrian | 7d7bb96 | 2017-05-04 09:54:39 -0400 | [diff] [blame] | 27 | docker rm -f pbuild |
Sergio Slobodrian | 4d30710 | 2017-04-24 10:19:00 -0400 | [diff] [blame] | 28 | |