Scott Baker | 381d0c3 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 1 | MYIP:=$(shell hostname -i) |
| 2 | RUNNING_CONTAINER=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}') |
| 3 | LAST_CONTAINER=$(shell sudo docker ps -l -q) |
Matteo Scandolo | 30a9ec0 | 2015-10-06 11:22:43 +0200 | [diff] [blame] | 4 | XOS_FOLDER=$(shell pwd) |
Scott Baker | 381d0c3 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 5 | |
| 6 | all: frontend |
| 7 | |
| 8 | frontend: |
| 9 | sudo apt-get -y install httpie |
| 10 | cat ../common/Dockerfile.common Dockerfile.frontend > Dockerfile |
| 11 | cd ../../..; sudo docker build -t xos -f xos/configurations/frontend/Dockerfile . |
Matteo Scandolo | 30a9ec0 | 2015-10-06 11:22:43 +0200 | [diff] [blame] | 12 | echo $(XOS_FOLDER) |
| 13 | sudo docker run -v $(XOS_FOLDER)/../../core/xoslib:/opt/xos/core/xoslib -p 9000:8000 --add-host="0.0.0.0:127.0.0.1" xos |
| 14 | #sudo docker run -d --add-host="0.0.0.0:$(MYIP)" -p 9999:8000 xos |
| 15 | #bash ../common/wait_for_xos.sh |
Scott Baker | 381d0c3 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 16 | |
| 17 | stop: |
| 18 | sudo docker stop $(RUNNING_CONTAINER) |
| 19 | |
Matteo Scandolo | 7abedf1 | 2015-10-20 16:28:41 +0200 | [diff] [blame] | 20 | start: |
| 21 | sudo docker start $(LAST_CONTAINER) |
| 22 | |
Scott Baker | 381d0c3 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 23 | showlogs: |
| 24 | sudo docker logs $(LAST_CONTAINER) |
| 25 | |
Scott Baker | 79147bc | 2015-10-01 15:45:57 -0700 | [diff] [blame] | 26 | enter: |
Scott Baker | 3078b35 | 2015-10-01 19:46:50 -0700 | [diff] [blame] | 27 | sudo docker exec -t -i $(RUNNING_CONTAINER) bash |