Scott Baker | 381d0c3 | 2015-09-30 20:34:05 -0700 | [diff] [blame] | 1 | MYIP:=$(shell hostname -i) |
| 2 | RUNNING_CONTAINER=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}') |
| 3 | LAST_CONTAINER=$(shell sudo docker ps -l -q) |
| 4 | |
| 5 | all: frontend |
| 6 | |
| 7 | frontend: |
| 8 | sudo apt-get -y install httpie |
| 9 | cat ../common/Dockerfile.common Dockerfile.frontend > Dockerfile |
| 10 | cd ../../..; sudo docker build -t xos -f xos/configurations/frontend/Dockerfile . |
| 11 | sudo docker run -d --add-host="0.0.0.0:$(MYIP)" -p 9999:8000 xos |
| 12 | bash ../common/wait_for_xos.sh |
| 13 | |
| 14 | stop: |
| 15 | sudo docker stop $(RUNNING_CONTAINER) |
| 16 | |
| 17 | showlogs: |
| 18 | sudo docker logs $(LAST_CONTAINER) |
| 19 | |
Scott Baker | 79147bc | 2015-10-01 15:45:57 -0700 | [diff] [blame] | 20 | enter: |
Scott Baker | 3078b35 | 2015-10-01 19:46:50 -0700 | [diff] [blame^] | 21 | sudo docker exec -t -i $(RUNNING_CONTAINER) bash |