dockerhubautomated-builds

DockerHub builds too many images


I set up DockerHub to build an image every time a commit is pushed to either dev or master on Github. Docker automated builds But every time a commit is pushed 2 builds are scheduled for the same tag.

Why?


Solution

  • Maybe you already found the solution, but in case other users run into the same issue:

    Docker Hub automated builds rely on some GitHub webhook to trigger the corresponding docker build at each push. However, in the past few months, Docker Hub has changed the corresponding URL entrypoint, so that GitHub repositories may contain several versions of the webhook, which leads to multiple, spurious builds. (See e.g. this GitHub issue for details)

    To fix this, you would just need to browse the webhooks settings of your GitHub repo − that should be at (private) URL https://github.com/cadoman/mapisto-api/settings/hooks − and only keep the Docker Hub item that starts with https://hub.docker.com/api/...