Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raivieiraadriano92/84c9717f6e256873a349b0d611642a61 to your computer and use it in GitHub Desktop.
Save raivieiraadriano92/84c9717f6e256873a349b0d611642a61 to your computer and use it in GitHub Desktop.
Linux - custom shell function
#Edite o arquivo:
~/.bashrc
#Adicione as funções desejadas:
php()
{
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/var/www jaschweder/php php "$@"
}
iphp()
{
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/var/www jaschweder/php bash
}
composer()
{
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src composer/composer "$@"
}
phpunit()
{
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/var/www -w /var/www jaschweder/php ./vendor/bin/phpunit "$@"
}
npm()
{
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src monostream/nodejs-gulp-bower npm "$@"
}
gulp()
{
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src monostream/nodejs-gulp-bower gulp "$@"
}
bower()
{
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src monostream/nodejs-gulp-bower bower "$@" --allow-root
}
#Salve o arquivo
#Reinicie o serviço:
. ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment