zsh: Run Composer with Docker
This commit is contained in:
parent
b71aec495a
commit
2f624af066
|
@ -15,6 +15,15 @@ function db {
|
||||||
is_linux() { [[ "$(uname)" == 'Linux' ]] }
|
is_linux() { [[ "$(uname)" == 'Linux' ]] }
|
||||||
is_macos() { [[ "$(uname)" == "Darwin" ]] }
|
is_macos() { [[ "$(uname)" == "Darwin" ]] }
|
||||||
|
|
||||||
|
function composer() {
|
||||||
|
docker run -u $UID -it --rm \
|
||||||
|
-v $(pwd):/app \
|
||||||
|
-v ~/.composer:/root/.composer \
|
||||||
|
-v ~/.ssh:/root/.ssh \
|
||||||
|
composer \
|
||||||
|
composer $*
|
||||||
|
}
|
||||||
|
|
||||||
# Run 'phpunit' or 'pest' depending on the project.
|
# Run 'phpunit' or 'pest' depending on the project.
|
||||||
function p () {
|
function p () {
|
||||||
vendor/bin/$(phpunit-or-pest) $*;
|
vendor/bin/$(phpunit-or-pest) $*;
|
||||||
|
|
Loading…
Reference in a new issue