Pingping Lin | b7a7d2b | 2016-08-19 18:11:36 +0000 | [diff] [blame^] | 1 | CONTAINER_NAME:=xos-server |
| 2 | IMAGE_NAME:=xosproject/xos |
| 3 | TOSCA_CONFIG_PATH:=/opt/xos/configurations/opencloud/opencloud.yaml |
| 4 | XOS_GIT_REPO?=git://github.com/open-cloud/xos.git |
| 5 | XOS_GIT_BRANCH?=master |
| 6 | NO_DOCKER_CACHE?=false |
| 7 | |
| 8 | .PHONY: build |
| 9 | build: ; sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} . |
| 10 | |
| 11 | .PHONY: custom |
| 12 | custom: ; cat Dockerfile.templ | sed -e "s|XOS_GIT_REPO|${XOS_GIT_REPO}|g" -e "s|XOS_GIT_BRANCH|${XOS_GIT_BRANCH}|g" | docker build --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} - |
| 13 | |
| 14 | .PHONY: devel |
| 15 | devel: ; cd ../..; ls; sudo docker build -f containers/xos/Dockerfile.devel --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} . |
| 16 | |
| 17 | .PHONY: run |
| 18 | run: ; sudo docker run -d --name ${CONTAINER_NAME} -p 80:8000 -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro ${IMAGE_NAME} |
| 19 | |
| 20 | .PHONY: runtosca |
| 21 | runtosca: ; sudo docker exec -it ${CONTAINER_NAME} /usr/bin/python /opt/xos/tosca/run.py padmin@vicci.org ${TOSCA_CONFIG_PATH} |
| 22 | |
| 23 | .PHONY: stop |
| 24 | stop: ; sudo docker stop ${CONTAINER_NAME} |
| 25 | |
| 26 | .PHONY: rm |
| 27 | rm: ; sudo docker rm ${CONTAINER_NAME} |