Skip to content

Instantly share code, notes, and snippets.

@nuke99
Last active April 16, 2021 08:51
Show Gist options
  • Save nuke99/68d58b94155e5af24e9d6ece2bd1cdac to your computer and use it in GitHub Desktop.
Save nuke99/68d58b94155e5af24e9d6ece2bd1cdac to your computer and use it in GitHub Desktop.
Temper Docker Support
#!/usr/bin/env bash
if [ $# -eq 0 ] ; then
echo "avaiable commands"
echo "- artisan"
echo "- composer"
echo "- shell"
echo "- yarn"
exit 1
fi
if [ $1 == "artisan" ] ; then
docker exec -it web_workspace php artisan ${@:2}
elif [ $1 == "composer" ] ; then
docker exec -it web_workspace composer ${@:2}
elif [ $1 == "shell" ] ; then
docker exec -it web_workspace bash
elif [ $1 == "yarn" ] ; then
docker exec -it web_workspace yarn ${@:2}
fi
@nuke99
Copy link
Author

nuke99 commented Apr 16, 2021

To install to mac
curl https://gist.githubusercontent.com/nuke99/68d58b94155e5af24e9d6ece2bd1cdac/raw/aea7a5bf802039af0f52a4fa3cc70177f5e2b80f/dev > /usr/local/bin/dev && chmod u+x /usr/local/bin/dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment