-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (31 loc) · 1.42 KB
/
Makefile
File metadata and controls
46 lines (31 loc) · 1.42 KB
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
44
45
46
.DEFAULT_GOAL := help
IMAGE := ghcr.io/yiisoft-contrib/php-dev
PHP_VERSION := 8.5
build: ## Build the docker image (use PHP_VERSION=8.x to override, default 8.5)
docker build --build-arg PHP_VERSION=$(PHP_VERSION) -t $(IMAGE):$(PHP_VERSION) docker
build81: ## Build the docker image for PHP 8.1
$(MAKE) build PHP_VERSION=8.1
build82: ## Build the docker image for PHP 8.2
$(MAKE) build PHP_VERSION=8.2
build83: ## Build the docker image for PHP 8.3
$(MAKE) build PHP_VERSION=8.3
build84: ## Build the docker image for PHP 8.4
$(MAKE) build PHP_VERSION=8.4
build85: ## Build the docker image for PHP 8.5
$(MAKE) build PHP_VERSION=8.5
shell: ## Run the container and open an interactive shell (use PHP_VERSION=8.x to override, default 8.5)
docker run --rm -it $(IMAGE):$(PHP_VERSION) bash
shell81: ## Run an interactive shell for PHP 8.1
$(MAKE) shell PHP_VERSION=8.1
shell82: ## Run an interactive shell for PHP 8.2
$(MAKE) shell PHP_VERSION=8.2
shell83: ## Run an interactive shell for PHP 8.3
$(MAKE) shell PHP_VERSION=8.3
shell84: ## Run an interactive shell for PHP 8.4
$(MAKE) shell PHP_VERSION=8.4
shell85: ## Run an interactive shell for PHP 8.5
$(MAKE) shell PHP_VERSION=8.5
hadolint: ## Run hadolint on the Dockerfile
docker run --rm -i hadolint/hadolint < docker/Dockerfile
help: ## Show this help
@awk 'BEGIN {FS = ":.*## "} /^[a-zA-Z0-9_-]+:.*##/ {printf "\033[36m%-12s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)