DEV Community

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

Posted on

1 1

Deploying Blackbox Exporter Image to Azure Container Registry Using Azure CLI

Goal :

  • Create BlackBox Exporter 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 BlackBox Exporter Image from DockerHub
docker pull prom/blackbox-exporter:latest

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

Result

Image

Image

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

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

Sign up