blob: 884c5da8c5b89255478b048b444bad85c7a377bc [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
Matteo Scandolo1c334412015-12-08 17:47:42 -080011 cp ../common/xos_common_config ../../xos/xos_configuration/
12 cp ./xos_frontend_config ../../xos/xos_configuration/
Scott Baker381d0c32015-09-30 20:34:05 -070013 cd ../../..; sudo docker build -t xos -f xos/configurations/frontend/Dockerfile .
Matteo Scandolo9d319902015-11-02 16:08:40 +010014 sudo docker run -v $(XOS_FOLDER)/../../core/xoslib:/opt/xos/core/xoslib -p 9999:8000 --add-host="0.0.0.0:127.0.0.1" xos
Matteo Scandolo28c5f6c2015-10-20 12:07:14 +020015 bash ../common/wait_for_xos.sh
16 echo $(RUNNING_CONTAINER)
Scott Baker381d0c32015-09-30 20:34:05 -070017
Matteo Scandolo74ad12e2015-11-10 15:10:21 +010018interactive:
19 cat ../common/Dockerfile.common Dockerfile.frontend > Dockerfile
Matteo Scandolo1c334412015-12-08 17:47:42 -080020 cp ../common/xos_common_config ../../xos/xos_configuration/
21 cp ./xos_frontend_config ../../xos/xos_configuration/
Matteo Scandolo74ad12e2015-11-10 15:10:21 +010022 cd ../../..; sudo docker build -t xos -f xos/configurations/frontend/Dockerfile .
23 echo "Inside the container run: /usr/bin/make -C /opt/xos/configurations/frontend -f Makefile.inside"
24 sudo docker run -it -v $(shell pwd)/../..:/opt/xos -p 9999:8000 --add-host="0.0.0.0:127.0.0.1" xos
25
Scott Baker381d0c32015-09-30 20:34:05 -070026stop:
27 sudo docker stop $(RUNNING_CONTAINER)
28
Matteo Scandolo28c5f6c2015-10-20 12:07:14 +020029start:
30 sudo docker start $(LAST_CONTAINER)
31
Scott Baker381d0c32015-09-30 20:34:05 -070032showlogs:
33 sudo docker logs $(LAST_CONTAINER)
34
Scott Baker79147bc2015-10-01 15:45:57 -070035enter:
Scott Baker3078b352015-10-01 19:46:50 -070036 sudo docker exec -t -i $(RUNNING_CONTAINER) bash