blob: 492eb77e31b35ad37418db44ce3a8e581358e7c7 [file] [log] [blame]
Scott Baker85d614f2017-02-01 14:30:40 -08001# Docker container Makefile for XOS
2#
3# Targets:
4#
5# `base` - XOS prerequistie files, no XOS code, builds xosproject/xos-base
6# `build` - base + XOS code, git pulled in Dockerfile from main repo,
7# builds xosproject/xos
8# `custom` - base + XOS code, git pulled in Dockerfile from selectable repo,
9# builds xosproject/xos
10# `devel` - base + XOS code from local directory, builds xosproject/xos
11# `test` - xosproject/xos + nodejs testing frameworks, builds
12# xosproject/xos-test
13#
14
15NO_DOCKER_CACHE ?= false
16
17CONTAINER_NAME ?= chameleon
18IMAGE_NAME ?= xosproject/chameleon
19
20XOS_GIT_REPO ?= https://github.com/opencord/xos.git
21XOS_GIT_BRANCH ?= master
22
23XOS_GIT_COMMIT_HASH ?= $(shell git log --pretty=format:'%H' -n 1 || echo -n "unknown" )
24XOS_GIT_COMMIT_DATE ?= $(shell git log --pretty=format:'%ad' -n 1 || echo -n "unknown" )
25
26BUILD_ARGS =
27ifdef http_proxy
28BUILD_ARGS += --build-arg http_proxy=${http_proxy}
29endif
30ifdef https_proxy
31BUILD_ARGS += --build-arg https_proxy=${https_proxy}
32endif
33
34chameleon:
35 sudo cp Dockerfile.chameleon /opt/cord/component/chameleon
36 sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm \
37 -f /opt/cord/component/chameleon/Dockerfile.chameleon -t ${IMAGE_NAME} ${BUILD_ARGS} /opt/cord/component/chameleon