I used to simply use the ‘latest’ version tag, but that occasionally caused problems with breaking changes in major updates.

I’m currently using podman-compose and I manually update the release tags periodically, but the number of containers keeps increasing, so I’m not very happy with this solution. I do have a simple script which queries the Docker Hub API for tags, which makes it slightly easier to find out whether there are updates.

I imagine a solution with a nice UI for seeing if updates are available and possibly applying them to the relevant compose files. Does anything like this exist or is there a better solution?

47 points

WatchTower can auto uodate your container or notify you when an update is available, I use it with a Matrix account for notifications

permalink
report
reply
16 points

Yes, https://containrrr.dev/watchtower/ is a great tool. Used it myself for a whole now.

permalink
report
parent
reply
3 points

+1 for watchtower. I’ve been using it for about a year now without any issues to keep anywhere from 5 to 10 Docker containers updated.

permalink
report
parent
reply
1 point

Sorry if it’s obvious, but I don’t see a way to use Matrix for notifications on their documentation and my searching is coming up blank. Do you by chance have a tutorial for this?

permalink
report
parent
reply
3 points
*

Here is how I did it:

docker run -d \
  --name watchtower \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_NOTIFICATION_URL=matrix://username:password@domain.org/?rooms=!ROOMID:domain.org \
  -e WATCHTOWER_NOTIFICATION_TEMPLATE="{{range .}}[WatchTower] ({{.Level}}): {{.Message}}{{println}}{{end}}" \
  containrrr/watchtower

Edit: I created a pull request to the WatchTower documentation, here: https://github.com/containrrr/watchtower/pull/1690

permalink
report
parent
reply
2 points

Thank you very much! I’ll get this set up on mine.

permalink
report
parent
reply
8 points

I pin most of my images and have https://newreleases.io/ tell me if something gets an update

permalink
report
reply
9 points

Ideally containers are provided with a major release version tag, so not just :latest but :0.18 for all 0.18.x releases that should in theory not break compatibility.

Then you can set your Podman systemd configuration file (I use Quadlet .container files) to automatically check for new versions and update them.

permalink
report
reply
3 points

In theory 🤡

permalink
report
parent
reply
2 points

Well, most projects publish their dockerfiles so you could take ans rebuild them with the tags you want. And all the building can be built into a CI/CD pipeline so you just have to make a new push with the latest versions.

I should make something like that.

permalink
report
parent
reply
1 point

this is the way to do it.

and periodically keep taps on main releases to swap from 0.18 to 0.19

permalink
report
parent
reply
14 points
*

The beer way I’ve found is to wait till something breaks. Message around on forums asking why I’m getting errors till someone recommends update and restart.

Blindly Remove the docker. Recreate.

And hope none of the configs break. ✌️💛

permalink
report
reply
15 points

Since my “homelab” is just that, a homelab, I’m comfortable with using :latest-tag on all my containers and just running docker-compose pull and docker-compose up -d once per week.

permalink
report
reply
2 points
*

This is mostly my strategy too. Most of the time I don’t have any issues, but occasionally I’ll jump straight to a version with breaking changes. If I have time to fix I go find the patch notes and update my config, otherwise I just tag the older version and come back later.

I’ve recently been moving my containers from docker compose into pure ansible though since I can write roles/playbooks to push config files and cycle containers which previously required multiple actions on docker compose. It’s also helped me to turn what used to be notes into actual code instead.

permalink
report
parent
reply
1 point
*

Just put all commands into a bash file. Starting with ‘’docker tag’’ changing tag to something else in case I need to revert and than pull, compose up. All run by crontab weekly. In case something breaks the latest working container is still there.

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 3.5K

    Monthly active users

  • 3.3K

    Posts

  • 71K

    Comments