Created
October 19, 2019 18:02
-
-
Save spy86/5d8a6459adbe06d671ae354ae54ca555 to your computer and use it in GitHub Desktop.
centos image with azure cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM centos:7.6.1810 | |
| RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && \ | |
| echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" \ | |
| > /etc/yum.repos.d/azure-cli.repo | |
| RUN yum install -y azure-cli | |
| CMD /usr/bin/az login --service-principal \ | |
| -u $AZURE_APPLICATION_ID \ | |
| -p $AZURE_SECRET \ | |
| --tenant $AZURE_TENANT_ID > /dev/null && \ | |
| $CMD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment