DEV Community

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

Posted on

4 2

Deploying Prometheus Image to Azure Container Registry Using Azure CLI

Less Talk , More Code

Goal :

  • Create Prometheus 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 Prometheus Image from DockerHub
docker pull prom/prometheus:latest

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

Result

1

2

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay