Hi Tim
You can actually pass any environment variable you have defined on your host into a Docker images.
The usecase for passing the ARM_CLIENT_ID and other ARM_ is to authenticated towards Azure. The ARM prefix for these environment variables means Azure Resource Manager. This is documented here: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
I have never worked with GCP, but according to the Terraform documentation at https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started it looks like you can achieve something similar using the GOOGLE_APPLICATION_CREDENTIALS.
Since GOOGLE_APPLICATION_CREDENTIALS points to a file, you would also have to start Docker with a --volume mapping so you can access the path to the file from inside Docker too.