blob: 2b847dd3e856fc24e9ee92a171ca81ec267cd5a6 [file] [log] [blame]
Scott Bakerd4f59d32015-09-29 23:07:09 -07001MYIP:=$(shell hostname -i)
Scott Baker19cdb6d2015-10-01 19:46:50 -07002RUNNING_CONTAINER:=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}')
Scott Baker764884a2015-10-01 15:45:57 -07003LAST_CONTAINER=$(shell sudo docker ps -l -q)
Scott Bakerd4f59d32015-09-29 23:07:09 -07004
5test: common_cloudlab
Scott Baker764884a2015-10-01 15:45:57 -07006 echo "# Autogenerated -- do not edit" > Dockerfile
7 cat ../common/Dockerfile.common Dockerfile.devel >> Dockerfile
Jeremy Mowery9b67a722015-11-29 20:59:49 -07008 cd ../../..; sudo docker build -t xos -f xos/configurations/devel/Dockerfile .
Andy Bavier1802c3e2015-10-06 14:33:34 -04009 sudo docker run -d --add-host="ctl:$(MYIP)" -p 9999:8000 xos
Scott Bakera6a43722015-09-30 20:34:05 -070010 bash ../common/wait_for_xos.sh
Scott Bakerd4f59d32015-09-29 23:07:09 -070011
12common_cloudlab:
13 make -C ../common -f Makefile.cloudlab
Scott Bakera6a43722015-09-30 20:34:05 -070014
15stop:
Scott Baker19cdb6d2015-10-01 19:46:50 -070016 sudo docker stop $(RUNNING_CONTAINER)
Scott Baker764884a2015-10-01 15:45:57 -070017
18showlogs:
19 sudo docker logs $(LAST_CONTAINER)
20
21enter:
Scott Baker19cdb6d2015-10-01 19:46:50 -070022 sudo docker exec -t -i $(RUNNING_CONTAINER) bash
Jeremy Mowery0dc63cc2015-12-05 00:20:38 -070023
24clean:
25 /proj/xos-PG0/acb/cleanup.sh
26 sudo docker stop $(docker ps -a -q)
27 sudo docker rm $(docker ps -a -q)
28 sudo docker rmi $(docker images -f "dangling=true" -q)