-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
63 lines (40 loc) · 1.53 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# `cd .` is because it sometimes solves https://github.com/docker/compose/issues/7899
DOCKER = cd . && DOCKER_UID=$(shell id -u) DOCKER_GID=$(shell id -g) docker compose
console:
$(DOCKER) run php bash
sh:
make console
release:
make build
build:
$(DOCKER) up -d
$(DOCKER) run php composer build # see composer.json -> "scripts" section
make test
compile-resources:
@# Help: One part of build process if you're only working with sass/js
$(DOCKER) run php npm run build
test:
$(DOCKER) run php pest
php53:
make build
docker run -it --rm --name my-running-script -v "$$PWD":/usr/src/myapp -w /usr/src/myapp \
orsolin/docker-php-5.3-apache php /usr/src/myapp/tests/temp_tests/php53test.php
php51:
docker run -it --rm --name my-running-script2 -v "$$PWD":/usr/src/myapp -w /usr/src/myapp \
horitaku1124/php51_centos7 php /usr/src/myapp/tests/temp_tests/php53test.php
update-test-snapshots:
$(DOCKER) run php pest -d --update-snapshots
nuke-docker:
@# Help: Nuclear option to force-remove all docker images, volumes and containers
-$(DOCKER) down --volumes
-$(DOCKER) rm --force --stop --volumes
-docker kill $$(docker ps -q)
-docker volume rm $$(docker volume ls -q)
-docker rmi --force $$(docker images -a -q)
# the above is always enough, but the following command would do all of that
# (and more!) and prune ALL cached images so they will have to be re-downloaded:
# -docker system prune -f
down-for-good:
@# Help: Stop docker and delete its volumes
-$(DOCKER) rm --force --stop --volumes
-$(DOCKER) down --volumes