Hello @Jared Hanson (US) - Welcome to Microsoft Q&A and thanks for reaching out.
In order to install the CDM python SDK in a docker build:
You can find it on : PyPi .
and you can install it using pip install azure. It's open, it's developed on GitHub and it's available on PyPi.
If you would like to run it on Python 3.6, please see the below code. it will be compatible with other versions also, like 3.5, 2.4 and 3.3
from azure.common.credentials import ServicePrincipalCredentials
from azure.mgmt.resource import ResourceManagementClient
import os
import keyring.backend
from keyrings.alt.file import PlaintextKeyring
keyring.set_keyring(PlaintextKeyring())
TENANT_ID = os.getenv('TENANT_ID')
CLIENT = os.getenv('CLIENT')
KEY = os.getenv('KEY')
SUBSCRIPTION = os.getenv('SUBSCRIPTION')
credentials = ServicePrincipalCredentials(
client_id=CLIENT,
secret=KEY,
tenant=TENANT_ID
)
client = ResourceManagementClient(credentials, SUBSCRIPTION)
rgs = client.resource_groups.list()
for rg in rgs:
print(rg.name)
For more information regarding the same, please take a look at the below document: azure-sdk-for-python-in-docker-container
Hope this helps.
------------------------------------------------------------------
If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.