onCreate only runs when the workspace is created first time, and then it will never run again.
You might just run the command echo "alias dc=\"docker compose\" ">> ~/.bashrc in your current terminal, but I’m not sure if everything outside of your workspace folder is resetted or deleted after some period of time.