Last active
March 5, 2023 03:41
-
-
Save matriphe/4dd57124beded953c7d303f16b5ca9cb to your computer and use it in GitHub Desktop.
Composer shell alias to run Composer Docker
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
#!/bin/bash | |
docker run \ | |
--interactive \ | |
--rm \ | |
--user $(id -u):$(id -g) \ | |
--volume ~/.composer:/tmp \ | |
--volume /etc/passwd:/etc/passwd:ro \ | |
--volume /etc/group:/etc/group:ro \ | |
--volume $(pwd):/app \ | |
composer "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
make sure the composer docker image is pulled and run correctly. put it in the
/usr/local/bin/composer
then just usecomposer
command as usual.