Scott Baker | d4f59d3 | 2015-09-29 23:07:09 -0700 | [diff] [blame] | 1 | MYIP:=$(shell hostname -i) |
Scott Baker | 19cdb6d | 2015-10-01 19:46:50 -0700 | [diff] [blame] | 2 | RUNNING_CONTAINER:=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}') |
Scott Baker | 764884a | 2015-10-01 15:45:57 -0700 | [diff] [blame] | 3 | LAST_CONTAINER=$(shell sudo docker ps -l -q) |
Scott Baker | d4f59d3 | 2015-09-29 23:07:09 -0700 | [diff] [blame] | 4 | |
| 5 | test: common_cloudlab |
Scott Baker | 764884a | 2015-10-01 15:45:57 -0700 | [diff] [blame] | 6 | echo "# Autogenerated -- do not edit" > Dockerfile |
| 7 | cat ../common/Dockerfile.common Dockerfile.devel >> Dockerfile |
Jeremy Mowery | 9b67a72 | 2015-11-29 20:59:49 -0700 | [diff] [blame] | 8 | cd ../../..; sudo docker build -t xos -f xos/configurations/devel/Dockerfile . |
Andy Bavier | 1802c3e | 2015-10-06 14:33:34 -0400 | [diff] [blame] | 9 | sudo docker run -d --add-host="ctl:$(MYIP)" -p 9999:8000 xos |
Scott Baker | a6a4372 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 10 | bash ../common/wait_for_xos.sh |
Scott Baker | d4f59d3 | 2015-09-29 23:07:09 -0700 | [diff] [blame] | 11 | |
| 12 | common_cloudlab: |
| 13 | make -C ../common -f Makefile.cloudlab |
Scott Baker | a6a4372 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 14 | |
| 15 | stop: |
Scott Baker | 19cdb6d | 2015-10-01 19:46:50 -0700 | [diff] [blame] | 16 | sudo docker stop $(RUNNING_CONTAINER) |
Scott Baker | 764884a | 2015-10-01 15:45:57 -0700 | [diff] [blame] | 17 | |
| 18 | showlogs: |
| 19 | sudo docker logs $(LAST_CONTAINER) |
| 20 | |
| 21 | enter: |
Scott Baker | 19cdb6d | 2015-10-01 19:46:50 -0700 | [diff] [blame] | 22 | sudo docker exec -t -i $(RUNNING_CONTAINER) bash |
Jeremy Mowery | 0dc63cc | 2015-12-05 00:20:38 -0700 | [diff] [blame^] | 23 | |
| 24 | clean: |
| 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) |