Skip to content

Instantly share code, notes, and snippets.

@jeslopcru
Last active July 22, 2022 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jeslopcru/d5a92792138be00aebc6d99cb40ce980 to your computer and use it in GitHub Desktop.
Save jeslopcru/d5a92792138be00aebc6d99cb40ce980 to your computer and use it in GitHub Desktop.
simple makefile for katas
.PHONY: help
help: ## Print this help.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
build: ## Build a dockerimage
docker build -t my-php .
install: ## install dependencies with "composer install"
docker run --rm -it -v $(shell pwd):/opt/project my-php composer install
composer: ## run a composer command with an argument arg
docker run --rm -it -v $(shell pwd):/opt/project my-php composer $(arg)
phpunit: ## run phpunit test
docker run --rm -it -v $(shell pwd):/opt/project my-php ./vendor/bin/phpunit
shell: ## shell inside docker container
docker run --rm -it -v $(shell pwd):/opt/project my-php /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment