blob: ba7f909b75808018ff67da8680acccc8f4bd18bb [file] [log] [blame]
Scott Baker381d0c32015-09-30 20:34:05 -07001MYIP:=$(shell hostname -i)
2RUNNING_CONTAINER=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}')
3LAST_CONTAINER=$(shell sudo docker ps -l -q)
Matteo Scandolo30a9ec02015-10-06 11:22:43 +02004XOS_FOLDER=$(shell pwd)
Scott Baker381d0c32015-09-30 20:34:05 -07005
6all: frontend
7
8frontend:
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 Scandolo30a9ec02015-10-06 11:22:43 +020012 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 Baker381d0c32015-09-30 20:34:05 -070016
17stop:
18 sudo docker stop $(RUNNING_CONTAINER)
19
Matteo Scandolo7abedf12015-10-20 16:28:41 +020020start:
21 sudo docker start $(LAST_CONTAINER)
22
Scott Baker381d0c32015-09-30 20:34:05 -070023showlogs:
24 sudo docker logs $(LAST_CONTAINER)
25
Scott Baker79147bc2015-10-01 15:45:57 -070026enter:
Scott Baker3078b352015-10-01 19:46:50 -070027 sudo docker exec -t -i $(RUNNING_CONTAINER) bash