Forum Discussion

FlavioCampana's avatar
FlavioCampana
Copper Contributor
Jul 05, 2022

Managed Identity inside docker container on linux VM

Hello

 

I'm trying to find how to pass a managed identity assigned to a linux vm to a container running inside it, but i can't find any documentation.

What should i do?

 

Thanks

1 Reply

  • It cannot pass the managed identity directly into a Docker container. Instead, you expose the Azure Instance Metadata Service (IMDS) endpoint from the Linux VM to the container. The container then queries IMDS to obtain tokens for the VM’s system-assigned or user-assigned managed identity. In practice, this means mounting network access to http://169.254.169.254/metadata/identity/oauth2/token inside the container and using it to request credentials.

Resources