zsh: Run Composer with Docker

This commit is contained in:
Oliver Davies 2020-07-30 01:17:38 +01:00
parent b71aec495a
commit 2f624af066

View file

@ -15,6 +15,15 @@ function db {
is_linux() { [[ "$(uname)" == 'Linux' ]] }
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.
function p () {
vendor/bin/$(phpunit-or-pest) $*;