Scott Baker | c87cb60 | 2016-06-01 17:49:07 -0700 | [diff] [blame] | 1 | IMAGE_NAME:=xosproject/xos-synchronizer-onboarding |
| 2 | CONTAINER_NAME:=xos-synchronizer |
| 3 | NO_DOCKER_CACHE?=false |
| 4 | |
Andy Bavier | d07df22 | 2016-08-18 10:28:36 -0400 | [diff] [blame^] | 5 | BUILD_ARGS = |
| 6 | ifdef http_proxy |
| 7 | BUILD_ARGS += --build-arg http_proxy=${http_proxy} |
| 8 | endif |
| 9 | ifdef https_proxy |
| 10 | BUILD_ARGS += --build-arg https_proxy=${https_proxy} |
| 11 | endif |
| 12 | |
Scott Baker | c87cb60 | 2016-06-01 17:49:07 -0700 | [diff] [blame] | 13 | .PHONY: build |
Andy Bavier | d07df22 | 2016-08-18 10:28:36 -0400 | [diff] [blame^] | 14 | build: ; sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm -t ${IMAGE_NAME} ${BUILD_ARGS} . |
Scott Baker | c87cb60 | 2016-06-01 17:49:07 -0700 | [diff] [blame] | 15 | |
| 16 | .PHONY: run |
| 17 | run: ; sudo docker run -d --name ${CONTAINER_NAME} -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro ${IMAGE_NAME} |
| 18 | |
| 19 | .PHONY: stop |
| 20 | stop: ; sudo docker stop ${CONTAINER_NAME} |
| 21 | |
| 22 | .PHONY: rm |
| 23 | rm: ; sudo docker rm ${CONTAINER_NAME} |