Last active
May 8, 2017 13:35
-
-
Save SmetDenis/548b9f75ee756c0a70dd4488e1104ba1 to your computer and use it in GitHub Desktop.
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
# https://marmelab.com/blog/2014/09/10/make-docker-command.html | |
# If the first argument is "composer"... | |
ifeq (composer,$(firstword $(MAKECMDGOALS))) | |
# use the rest as arguments for "composer" | |
COMPOSER_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | |
# ...and turn them into do-nothing targets | |
$(eval $(COMPOSER_ARGS):;@:) | |
endif | |
composer: | |
@mkdir --parent /var/tmp/composer | |
@sudo docker run -ti \ | |
-v `pwd`:/srv \ | |
-v /var/tmp/composer:/root/.composer \ | |
docker-composer $(COMPOSER_ARGS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment