Search code examples
azureazure-iot-hubazure-container-registry

How to pull docker image in Ubuntu Server from Azure Container Registry (Site to site connection)?


I want to pull a container image from Azure Container Registry. I'm using Ubuntu Server 18.04 which don't have internet connection (we can't enable internet due to some requirements) but we have site to site connectivity from Ubuntu Server to Azure resource.

If I use

docker pull myregistry.azurecr.io/container_name:latest 

It makes a call to https://myregistry.azurecr.io which is connecting to internet and we don't want that.

Any other way of doing it in private manner. Let me know if you need more details.


Solution

  • You can use the private endpoint to access the Azure Container Registry from the VNet, and you can add the rules to allow or deny access from the site to site. Here are steps to add the rules.