shortcut for using docker contexts
As cool as docker contexts are, I kept running into an issue: I would forget to switch contexts before running a command. I wanted to be able to run docker commands as normal, but have them automatically use the correct context.
I decided to devise a solution consisting of convention and my existing tools:
I name my directories containing docker-compose.yml manifests after the context they are intended for. I use command substitution when executing docker commands, so that I can use the current directory name to determine the context.