docker-autoheal icon indicating copy to clipboard operation
docker-autoheal copied to clipboard

Possibility to exclude containers with a label?

Open saschabrockel opened this issue 2 years ago • 8 comments

Is it possible to use a label to specify containers that should be excluded from autoheal instead of being included? I have 100 containers and I don't want to add labels for inclusion to 99 ones because one shouldn't be auto-healed.

saschabrockel avatar Jan 31 '24 09:01 saschabrockel

This seems to be the same as #73 which has been addressed by #84

tmknight avatar Feb 18 '24 16:02 tmknight

This is as good of an explanation as any other on how to achieve what you're asking: https://sdr-enthusiasts.gitbook.io/ads-b/useful-extras/auto-restart-unhealthy-containers#only-monitor-and-restart-a-specific-set-of-containers

MrClever avatar Feb 25 '24 06:02 MrClever

@MrClever as I stated, it's not nice to change 99 containers for that and add a label to all of them.

saschabrockel avatar Feb 25 '24 06:02 saschabrockel

MrClever as I stated, it's not nice to change 99 containers for that and add a label to all of them.

@saschabrockel Fair enough - I forget not everyone auto-generates their configuration files from templates etc 👍🏻 In my case, it was literally two lines to update hundreds of images.

MrClever avatar Feb 25 '24 06:02 MrClever

@MrClever what kind of templates? I mean we all have compose files I guess but that's obviously not what you mean.

saschabrockel avatar Feb 25 '24 06:02 saschabrockel

I have a bespoke system for generating compose files etc which populates all the repeated stuff. The container configurations are stored in a custom MySQL DB...it wasn't my creation, but it "works" (most of the time). These days, I'd prefer to replace it with a "proper" orchestration framework, but it works well enough that I can't really justify the time/cost to replace it :(

MrClever avatar Feb 25 '24 06:02 MrClever

Okay never heard of it. I know infrastructure as code and things like Ansible of course but never heard of something that is stored in MySQL 😆

saschabrockel avatar Feb 25 '24 06:02 saschabrockel

Okay never heard of it. I know infrastructure as code and things like Ansible of course but never heard of something that is stored in MySQL 😆

Yeh, like I said, give me Ansible/Puppet/Chef/etc any day...this thing can be a pain, but it also makes mass changes to configurations easy.

MrClever avatar Feb 25 '24 06:02 MrClever