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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

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

Okay