mirror of
https://github.com/containrrr/watchtower.git
synced 2026-01-06 00:58:49 +01:00
Consolidated all post-fork updates including dependency bumps and workflow changes
This commit is contained in:
parent
2abaa47fd3
commit
6b62d53797
100 changed files with 1503 additions and 1264 deletions
|
|
@ -7,8 +7,8 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/containrrr/watchtower/internal/util"
|
||||
wt "github.com/containrrr/watchtower/pkg/types"
|
||||
"github.com/nicholas-fedor/watchtower/internal/util"
|
||||
wt "github.com/nicholas-fedor/watchtower/pkg/types"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
|
|
@ -304,6 +304,29 @@ func (c Container) GetCreateConfig() *dockercontainer.Config {
|
|||
}
|
||||
}
|
||||
|
||||
// Clear HEALTHCHECK configuration (if default)
|
||||
if config.Healthcheck != nil && imageConfig.Healthcheck != nil {
|
||||
if util.SliceEqual(config.Healthcheck.Test, imageConfig.Healthcheck.Test) {
|
||||
config.Healthcheck.Test = nil
|
||||
}
|
||||
|
||||
if config.Healthcheck.Retries == imageConfig.Healthcheck.Retries {
|
||||
config.Healthcheck.Retries = 0
|
||||
}
|
||||
|
||||
if config.Healthcheck.Interval == imageConfig.Healthcheck.Interval {
|
||||
config.Healthcheck.Interval = 0
|
||||
}
|
||||
|
||||
if config.Healthcheck.Timeout == imageConfig.Healthcheck.Timeout {
|
||||
config.Healthcheck.Timeout = 0
|
||||
}
|
||||
|
||||
if config.Healthcheck.StartPeriod == imageConfig.Healthcheck.StartPeriod {
|
||||
config.Healthcheck.StartPeriod = 0
|
||||
}
|
||||
}
|
||||
|
||||
config.Env = util.SliceSubtract(config.Env, imageConfig.Env)
|
||||
|
||||
config.Labels = util.StringMapSubtract(config.Labels, imageConfig.Labels)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue