Skip to content

Instantly share code, notes, and snippets.

@spy86
Created October 19, 2019 18:02
Show Gist options
  • Select an option

  • Save spy86/5d8a6459adbe06d671ae354ae54ca555 to your computer and use it in GitHub Desktop.

Select an option

Save spy86/5d8a6459adbe06d671ae354ae54ca555 to your computer and use it in GitHub Desktop.
centos image with azure cli
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