istio
1## Copyright 2018 Istio 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.PHONY: docker16.PHONY: docker.all17.PHONY: docker.save18.PHONY: docker.push19
20### Docker commands ###
21# Below provides various commands to build/push docker images.
22# These are all wrappers around ./tools/docker, the binary that controls docker builds.
23# Builds can also be done through direct ./tools/docker invocations.
24# When using these commands the flow is:
25# 1) make target calls ./tools/docker
26# 2) ./tools/docker calls `make build.docker.x` targets to compute the dependencies required
27# 3) ./tools/docker triggers the actual docker commands required
28# As a result, there are two layers of make involved.
29
30docker: ## Build all docker images31./tools/docker
32
33docker.save: ## Build docker images and save to tar.gz34./tools/docker --save
35
36docker.push: ## Build all docker images and push to37./tools/docker --push
38
39# Legacy command aliases
40docker.all: docker41@:42dockerx.save: docker.save43@:44dockerx.push: docker.push45@:46dockerx.pushx: docker.push47@:48dockerx: docker49@:50
51# Support individual images like `dockerx.pilot`
52
53# Docker commands defines some convenience targets
54# Build individual docker image and push it. Ex: push.docker.pilot
55push.docker.%:56DOCKER_TARGETS=docker.$* ./tools/docker --push57
58# Build individual docker image and save it. Ex: tar.docker.pilot
59tar.docker.%:60DOCKER_TARGETS=docker.$* ./tools/docker --save61
62# Build individual docker image. Ex: docker.pilot
63docker.%:64DOCKER_TARGETS=docker.$* ./tools/docker65
66# Build individual docker image. Ex: dockerx.pilot
67dockerx.docker.%:68DOCKER_TARGETS=docker.$* ./tools/docker69### End docker commands ###
70