blob: cf91988e50b6a9b3aef654b429ee16588d008489 [file] [log] [blame]
Tony Mackaeefc662015-10-30 18:08:47 +00001CONTAINER_NAME:=xos-server
David K. Bainbridgeab4a2eb2015-12-03 11:49:01 -08002IMAGE_NAME:=xosproject/xos
Tony Mack86cbbd72015-11-01 16:31:30 +00003TOSCA_CONFIG_PATH:=/opt/xos/configurations/opencloud/opencloud.yaml
David K. Bainbridgefe8bfcd2015-12-03 22:12:06 -08004XOS_GIT_REPO?=git://github.com/open-cloud/xos.git
5XOS_GIT_BRANCH?=master
Jeremy Mowerye07a38b2016-04-16 12:25:30 -07006NO_DOCKER_CACHE?=false
Tony Mack7c162e72015-10-30 15:22:20 +00007
Tony Mackaeefc662015-10-30 18:08:47 +00008.PHONY: build
Andy Bavierf9e48bd2016-01-20 16:29:29 -08009build: ; sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} .
David K. Bainbridgefe8bfcd2015-12-03 22:12:06 -080010
11.PHONY: custom
Andy Bavierbeef3fb2016-01-06 16:40:00 -050012custom: ; 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
Andy Bavierf9e48bd2016-01-20 16:29:29 -080015devel: ; cd ../..; ls; sudo docker build -f containers/xos/Dockerfile.devel --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} .
Tony Mackaeefc662015-10-30 18:08:47 +000016
Matteo Scandoloa6658422016-04-06 14:44:56 -070017.PHONY: test
18test: ; cd ../..; ls; sudo docker build -f containers/xos/Dockerfile.test --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} .
19
Tony Mackaeefc662015-10-30 18:08:47 +000020.PHONY: run
Andy Bavierf9e48bd2016-01-20 16:29:29 -080021run: ; sudo docker run -d --name ${CONTAINER_NAME} -p 80:8000 -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro ${IMAGE_NAME}
Tony Mackaeefc662015-10-30 18:08:47 +000022
23.PHONY: runtosca
Andy Bavierf9e48bd2016-01-20 16:29:29 -080024runtosca: ; sudo docker exec -it ${CONTAINER_NAME} /usr/bin/python /opt/xos/tosca/run.py padmin@vicci.org ${TOSCA_CONFIG_PATH}
Tony Mackaeefc662015-10-30 18:08:47 +000025
26.PHONY: stop
Andy Bavierf9e48bd2016-01-20 16:29:29 -080027stop: ; sudo docker stop ${CONTAINER_NAME}
Tony Mackaeefc662015-10-30 18:08:47 +000028
Tony Mackbfae0ea2015-10-31 18:12:38 +000029.PHONY: rm
Andy Bavierf9e48bd2016-01-20 16:29:29 -080030rm: ; sudo docker rm ${CONTAINER_NAME}