Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying docker image to azure without registry

Is there a way to deploy a docker image to an Azure function without using any registry?

What I need is to build the image on my machine and then push it to my azure function...

Can we do this with docker or this makes no sense and I should abandon this idea right now? :)

like image 890
JuChom Avatar asked Oct 25 '25 13:10

JuChom


1 Answers

EDIT:
While the answer below is not wrong, it requires the user to set up a bridge between the private registry and your azure resources. Basically azure needs access to the private registry to be able to pull images from it.

VSCode has an experimental feature for Docker plugin. You can now connect to a private registry that can be a local one. You should be able to push from there (I hope, I am still testing this right now).
More on how to create a local registry: https://gabrieltanner.org/blog/docker-registry

Edit: Just tested it and it works. I successfully uploaded a local image using the most basic of local registries. While this doesn't answer the question it shows that you can do that without much of any configuration. All you need is a docker daemon and a localhost registry. Just use the docker-compose specified in the link or the one below.

  1. Create a local registry.
  2. Push tag your image with this local registry.
  3. Using the VSCode Docker extension connect to the Generic (local) registry.
  4. Using the VSCode Docker and Azure extension choose the image from the local registry, right click it and choose deploy to Azure as App Service.
version: '3'

services:
  registry:
    image: registry:2
    ports:
    - "5000:5000"
like image 161
nlhnt Avatar answered Oct 28 '25 03:10

nlhnt