backend
backend copied to clipboard
Cron to rebuild base Docker image
At present, we sometimes find ourselves unable to build certain containers because our base
image doesn't change much, and consequently isn't rebuilt very often. That means that the apt
package links occasionally 404 as a result of old packages getting removed from the repository when new ones become available (additional context here).
One way to solve this problem would be to create a cron to rebuild the base
image daily or weekly.
Just to reiterate, this is "someday / nice to have" task.
Some notes:
-
GitHub Workflows support scheduled jobs: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
-
We're supposedly limited to 2000 Action minutes/month but I think in our case they're effectively unlimited for some reason? Is this limit for private repos only?
-
Easy way to trigger the
base
image rebuild would be to print out thedocker pull
commands instead of running them directly from the./dev/pull.py
script, grep out thebase
containers (being careful to leave others that might be matching thebase
string), and pull only those, i.e. instead of:./dev/pull.py
one can do something like:
./dev/pull.py -p | grep -v '/base' | bash
(We're reverse-grepping for slash-
base
here so that it doesn't match images such assolr-base
.)