I am trying to figure out how to get my Ubuntu docker server to react to code commits on a git-repo and build and deploy an image based on that.

I have a git repo in Azure Devops that contains an Angular project (with a working dockerfile).

I found that Docker does have automatic builds but it's a paid feature. enter image description here

I have previously created build pipelines in Azure which work well (albeight very slowly), I am wondering if it is possible to get my Ubuntu VPS Docker host to react to git commits on the main branch and pull the latest code and build the docker image and replace it on the (local) server.

Just to be clear, I want to do all this on my own VPS. Any guides or hints to keywords that I should be looking for are much appreciated.

2 Answers 2


As far as I can see, you can only use Webhook on an actual repository that will call some service on your docker host. Docker host must be aware somehow.

That is how to set up webhook. https://learn.microsoft.com/en-us/azure/devops/service-hooks/services/webhooks?view=azure-devops

So flow is something like:

  1. create microservice on docker host
  2. create webhook on docker Azure repo
  3. 2 URL will be 1 endpoint

1 can be run as docker user, so you have permission to execute docker build and so on.

I would do it this way.


Probably you can do the opposite, make github call the docker server. Use self hosted github runners. Configure and run the github agent on your server. An then create an action to do what you want on the docker server. That action can be auto fired for example with a commit or a merge,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.