DEV Community

Cover image for Deploying Grafana Image to Azure Container Registry Using Azure CLI
Suryabhan Singh Vaghela
Suryabhan Singh Vaghela

Posted on • Edited on

3 1

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

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (1)

Collapse
 
sulianeal profile image
SuliaNeal
Comment hidden by post author

Some comments have been hidden by the post's author - find out more

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay