Container Updates

Install Renovate Bot

The Renovate Bot watches for dependancies and automatically creates merge requests to update the contents of your Repo. This allows you to update your containers outside of Portainer as well as review changes made etc.

Get your Repo ready

  1. Create a folder '.github' in the root of your repo

  2. Create a folder 'docker-compose' in the root of your repo

  3. In the '.github' folder, create a file 'renovate.json5' with the below contents

{
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "extends": [
        "config:base",
        ":disableRateLimiting"
    ],
    "docker-compose": {
        "fileMatch": ["docker-compose/.+\\.ya?ml$"]
    }
}
circle-info

This code block tells the bot to watch any '.yml' or '.yaml' file in the 'docker-compose' folder

Feel free to use a different directory or the root of the repo

Install the Bot

  1. Follow this link arrow-up-rightto install the bot

  2. You can set renovate to run on all repo's you own, or only your repo created in this doco &#xNAN;This is up to you. If you actually use GitHub for development, it may be best to select only this repo

Confirm the bot is installed

  1. Browse to your GitHub repo

  2. Click on 'Issues', you should see the Dependency Dashboard

Updating the Compose file

When a new update is released, the renovate bot will create a pull request in your repo;

the 'home page' of a pull request

We can see that this pull request is updating the package 'mariadb'. It is a minor update, going from version 10.5 to 10.11

Clicking on the 'Files changed' tab will list any files that will be updated;

this pull request will replace the red line with the green line

If we are happy with this update, we can click on the 'Merge pull request' button at the bottom of the homepage

Last updated