Matteo Scandolo | 1d01b69 | 2018-10-03 15:53:36 -0700 | [diff] [blame] | 1 | # Copyright 2017 the original author or authors. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | |
| 16 | # Container are build via the `make build` commands. |
| 17 | |
| 18 | # Optional parameters are: |
| 19 | # `REGISTRY=192.168.99.100:3000/ REPOSITORY=xosproject/ DOCKER_BUILD_ARGS="--no-cache" TAG=dev make build` |
| 20 | |
| 21 | ifeq ($(TAG),) |
| 22 | TAG := candidate |
| 23 | endif |
| 24 | |
| 25 | ifeq ($(REPOSITORY),) |
| 26 | REPOSITORY := xosproject/ |
| 27 | endif |
| 28 | |
| 29 | summary: |
| 30 | @echo Building images with: |
| 31 | @echo " Build args: $(DOCKER_BUILD_ARGS)" |
| 32 | @echo " Registry: ${REGISTRY}" |
| 33 | @echo " Repository: ${REPOSITORY}" |
| 34 | @echo " Tag: ${TAG}" |
| 35 | |
| 36 | build: summary xos-base xos-libraries xos-client xos-core xos-synchronizer-base |
| 37 | |
| 38 | xos-base: |
| 39 | docker build $(DOCKER_BUILD_ARGS) -t ${REGISTRY}${REPOSITORY}xos-base:${TAG} -f Dockerfile.base . |
| 40 | |
| 41 | xos-libraries: |
Matteo Scandolo | 12651d7 | 2019-02-21 15:15:29 -0800 | [diff] [blame] | 42 | docker build --no-cache $(DOCKER_BUILD_ARGS) -t ${REGISTRY}${REPOSITORY}xos-libraries:${TAG} -f Dockerfile.libraries ../.. |
Matteo Scandolo | 1d01b69 | 2018-10-03 15:53:36 -0700 | [diff] [blame] | 43 | |
| 44 | xos-client: |
| 45 | rm -rf tmp.chameleon |
| 46 | cp -R ../../../../component/chameleon tmp.chameleon |
Matteo Scandolo | 12651d7 | 2019-02-21 15:15:29 -0800 | [diff] [blame] | 47 | docker build --no-cache $(DOCKER_BUILD_ARGS) -t ${REGISTRY}${REPOSITORY}xos-client:${TAG} -f Dockerfile.client ../.. |
Matteo Scandolo | 1d01b69 | 2018-10-03 15:53:36 -0700 | [diff] [blame] | 48 | |
| 49 | xos-core: |
Matteo Scandolo | 12651d7 | 2019-02-21 15:15:29 -0800 | [diff] [blame] | 50 | docker build --no-cache $(DOCKER_BUILD_ARGS) -t ${REGISTRY}${REPOSITORY}xos-core:${TAG} -f Dockerfile.xos-core ../.. |
Matteo Scandolo | 1d01b69 | 2018-10-03 15:53:36 -0700 | [diff] [blame] | 51 | |
| 52 | xos-synchronizer-base: |
Matteo Scandolo | 12651d7 | 2019-02-21 15:15:29 -0800 | [diff] [blame] | 53 | docker build --no-cache $(DOCKER_BUILD_ARGS) -t ${REGISTRY}${REPOSITORY}xos-synchronizer-base:${TAG} -f Dockerfile.synchronizer-base ../.. |