mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
feature/367 fix: skip container if pre-update command fails
This commit is contained in:
parent
fac26dfc72
commit
c1a0da9a9d
1 changed files with 7 additions and 3 deletions
|
@ -74,7 +74,11 @@ func stopStaleContainer(container container.Container, client container.Client,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if params.LifecycleHooks {
|
if params.LifecycleHooks {
|
||||||
lifecycle.ExecutePreUpdateCommand(client, container)
|
if err := lifecycle.ExecutePreUpdateCommand(client, container); err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
log.Info("Skipping container as the pre-update command failed")
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := client.StopContainer(container, params.Timeout); err != nil {
|
if err := client.StopContainer(container, params.Timeout); err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue