Easy aliases for CLI and shell with Docker!

Aaron
Aaron Member, Administrator, Moderator, Employee Posts: 634 admin
edited May 1 in Tips and Tricks #1

Are you tired of typing docker exec -it solaceXYZ cli every time you log into CLI?  I know I am!  Try adding these aliases to your .bash_alias (or whatever) file:

alias cli='docker ps | grep solace-pubsub | head -1 | cut -c1-8 | xargs -I id -o docker exec -it id cli'
alias shell='docker ps | grep solace-pubsub | head -1 | cut -c1-8 | xargs -I id -o docker exec -it id bash'

Then cli goes straight into CLI for your "first" broker (if you have multiple), and shell goes into the control-plane support shell.

So much easier! 🙌🏼