Created
June 7, 2019 13:10
-
-
Save micoli/3e623a7e63f41100a4d7c33cb7d31118 to your computer and use it in GitHub Desktop.
Minimalist Makefile to help local php DX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: help | |
help: | |
@echo "Usage:" | |
@echo " make [command]" | |
@echo | |
@echo "Available commands:" | |
@grep -v '^_' Makefile | grep '^[^#[:space:]].*:' | grep -v '^default' | sed 's/:\(.*\)//' | xargs -n 1 echo ' -' | |
@echo | |
stop-dev: | |
docker kill php-dev-runner || true | |
docker rm php-dev-runner || true | |
up-dev: stop-dev | |
docker run -d -t --name php-dev-runner -v $$PWD:$$PWD -p 0.0.0.0:8083:8083 -w $$PWD thecodingmachine/php:7.3-v2-cli -- php -S 0.0.0.0:8083 -t public/ | |
shell: | |
docker exec -it php-dev-runner bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment