Skip to content

Commit 597404c

Browse files
Benoit NgoNgob
authored andcommitted
Adding docker prunes commands into makefile
1 parent 1a0654d commit 597404c

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

Makefile

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ frontlint: sync-env ## lint front (fix)
133133
docker compose exec front yarn lint --fix
134134

135135
.PHONY: frontcheck
136-
frontcheck: ## lint front (check)
137-
docker sync-env compose exec front yarn lint
136+
frontcheck: sync-env ## lint front (check)
137+
docker compose exec front yarn lint
138138

139139
.PHONY: ci
140140
ci: cs-fix phpstan phpmd cs-check frontlint ## Run all CI tools
@@ -154,17 +154,22 @@ dump: ## dump database in apps/back/dump/dump.sql (use git lfs)
154154
gzip -f apps/back/dump/dump.sql
155155
git lfs track ./apps/back/dump/dump.sql.gz
156156

157-
.PHONY: help
158-
help: ## This help.
159-
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
160157

161158
.PHONY: network-prune
162-
network-prune: ;\
163-
docker network prune
159+
network-prune: ## Prune networks
160+
docker network prune
164161
.PHONY: image-prune
165-
image-prune: ;\
166-
docker image prune -a
162+
image-prune: ## Prune images
163+
docker image prune -a
167164
.PHONY: system-prune
168-
system-prune: ;\
169-
docker system prune
170-
prune: system-prune image-prune network-prune
165+
system-prune: ## Prune system
166+
docker system prune -a
167+
.PHONY: system-prune
168+
system-prune-volumes: ## Prune system with --volumes /!\ Data will be lost
169+
docker system prune -a --volumes
170+
prune: system-prune image-prune network-prune
171+
172+
173+
.PHONY: help
174+
help: ## This help.
175+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

0 commit comments

Comments
 (0)