Have a situation where docker run ....
is "wrapping" an unknown number of potential arguments so we can't use a function. If you're curious: https://github.com/dbt-labs/dbt-core/tree/main/docker#running-an-image-in-a-container
So I want to alias the docker run ....
part of the docker run..... {real command}
command.
alias my_command="docker run -e PASS='mypass' --some-setting"
'mypass'
needs to be in single quotes.
With the above alias, alias my_command
yields
alias mycommand='docker run -e PASS='\''mypass'\'' --some-setting'
And this doesn't execute the right command. Specifically we get a permission denied. Running the exact same command straight, without the alias, works:
docker run -e PASS='mypass' --some-setting