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