blob: 0ba043da5e10252fca903a054eeb6d3a5e7b129c [file] [log] [blame]
Pingping Linb7a7d2b2016-08-19 18:11:36 +00001CONTAINER_NAME:=xos-server
2IMAGE_NAME:=xosproject/xos
3TOSCA_CONFIG_PATH:=/opt/xos/configurations/opencloud/opencloud.yaml
4XOS_GIT_REPO?=git://github.com/open-cloud/xos.git
5XOS_GIT_BRANCH?=master
6NO_DOCKER_CACHE?=false
7
8.PHONY: build
9build: ; sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} .
10
11.PHONY: custom
12custom: ; 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
15devel: ; cd ../..; ls; sudo docker build -f containers/xos/Dockerfile.devel --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} .
16
17.PHONY: run
18run: ; 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
21runtosca: ; sudo docker exec -it ${CONTAINER_NAME} /usr/bin/python /opt/xos/tosca/run.py padmin@vicci.org ${TOSCA_CONFIG_PATH}
22
23.PHONY: stop
24stop: ; sudo docker stop ${CONTAINER_NAME}
25
26.PHONY: rm
27rm: ; sudo docker rm ${CONTAINER_NAME}