首页 > 解决方案 > How can I get Dockerhub to rebuild my images daily?

问题描述

We have our base images set up on Dockerhub, and they will rebuild whenever the upstream repositories change.

In our Dockerfiles we install several packages with apt-get.
We'd like to have the most recent versions of these packages at all times. Since these packages have nothing to do with the upstream repo's, we'd need to reinstall them into our base image regularly.

One seemingly simple solution would be to have a scheduled rebuild of our images, for example daily or hourly. Each run would pull in the latest versions and bake it into the base image.

However, I can't find any way to do this. There's no option for it in the Dockerhub UI, and I can't find any reference for an API call or webhook that I can trigger from a cron job.

Has anyone come across a way to set up scheduled builds, or a reason why something this (seemingly) straightforward is unsupported?

标签: dockerdockerhub

解决方案


Build triggers (Trigger your Automated Build by sending a POST to a specific endpoint.Configure Automated Builds. 不幸的是,此功能最近已更改,我无法找到当前文档。可以选择发布一些数据,例如'docker_tag=dev'通过 docker tag/branch/... 触发特定构建


推荐阅读