-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (34 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
DIR := $(realpath $(dir $(realpath $(MAKEFILE_LIST))))
IMAGES_DIR := $(DIR)/images
BUILD_IMAGE := $(DIR)/bin/build-image
IMAGES_REGISTRY ?=
IMAGES_PREFIX = $(if $(IMAGES_REGISTRY),$(IMAGES_REGISTRY)/)
DOCKERFILE_TPL := $(DIR)/images/runtime/templates/Dockerfile
DOCKERFILE_72 := $(DIR)/images/runtime/7.2/Dockerfile
DOCKERFILE_72_VARS := $(DIR)/images/runtime/7.2/variables.json
DOCKERFILE_73 := $(DIR)/images/runtime/7.3/Dockerfile
DOCKERFILE_73_VARS := $(DIR)/images/runtime/7.3/variables.json
.PHONY: php7.2-runtime
php7.2-runtime: | php7.2-7.3-build
$(BUILD_IMAGE) \
$(IMAGES_DIR)/runtime \
$(IMAGES_DIR)/runtime/7.2/Dockerfile \
$(IMAGES_PREFIX)$@
.PHONY: php7.3-runtime
php7.3-runtime: | php7.2-7.3-build
$(BUILD_IMAGE) \
$(IMAGES_DIR)/runtime \
$(IMAGES_DIR)/runtime/7.3/Dockerfile \
$(IMAGES_PREFIX)$@
.PHONY: php7.2-7.3-build
php7.2-7.3-build:
$(BUILD_IMAGE) \
$(IMAGES_DIR)/build \
$(IMAGES_DIR)/build/7.2-7.3/Dockerfile \
$(IMAGES_PREFIX)$@
.PHONY: dockerfiles
dockerfiles: $(DOCKERFILE_72) $(DOCKERFILE_73)
$(DOCKERFILE_72): $(DOCKERFILE_72_VARS) $(DOCKERFILE_TPL)
$(DIR)/bin/render-template $(DOCKERFILE_TPL) $(DOCKERFILE_72_VARS) > $@
$(DOCKERFILE_73): $(DOCKERFILE_73_VARS) $(DOCKERFILE_TPL)
$(DIR)/bin/render-template $(DOCKERFILE_TPL) $(DOCKERFILE_73_VARS) > $@