Scott Baker | d4f59d3 | 2015-09-29 23:07:09 -0700 | [diff] [blame] | 1 | MYIP:=$(shell hostname -i) |
Scott Baker | a6a4372 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 2 | EXISTING_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 |
Scott Baker | 57151b9 | 2015-10-01 10:53:15 -0700 | [diff] [blame] | 8 | cd ../../..; sudo docker build -t xos -f xos/configurations/devel/Dockerfile . |
Scott Baker | a6a4372 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 9 | sudo docker run -d --add-host="0.0.0.0:$(MYIP)" -p 9999:8000 xos |
| 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: |
| 16 | sudo docker stop $(EXISTING_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: |
| 22 | sudo docker exec -t -i $(EXISTING_CONTAINER) bash |