Deploying Grafana Image to Azure Container Registry Using Azure CLI

suryabhansv

Suryabhan Singh Vaghela

Posted on July 9, 2022

Deploying Grafana Image to Azure Container Registry Using Azure CLI

Goal :

  • Create Grafana Image to Azure Container Registry using Azure CLI

Result

  • Private Container Image rather than Public Docker Hub Image.

Script

$ResourceGroupName  = "suryarg"
$LocationName       = "eastus2"
$ACRName            = "suryacr"
$ACRUrl             = "$ACRName.azurecr.io"

#Create a resource group
az group create --name $ResourceGroupName --location $LocationName

#Create a container registry
az acr create --resource-group $ResourceGroupName --name $ACRName --sku Basic --admin-enabled true


#Log in to Azure Container Registry
az acr login --name $ACRName


#First Pull latest Grafana Image from DockerHub
docker pull grafana/grafana:latest

#Then Push into Azure Container Registry
docker tag grafana/grafana:latest $ACRUrl/grafana:SuryaLatest
docker push $ACRUrl/grafana:SuryaLatest
Enter fullscreen mode Exit fullscreen mode

Result

1

2

💖 💪 🙅 🚩
suryabhansv
Suryabhan Singh Vaghela

Posted on July 9, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related